From e65b57e7ad24bdb45edfe953a4f370ab1771598d Mon Sep 17 00:00:00 2001 From: Jakub Miazek Date: Sat, 17 Feb 2024 12:21:55 +0100 Subject: [PATCH] wip: docs --- README.md | 24 +++++++++++------------- app/api/nonsense.py | 2 -- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 44e8f65..bba5426 100644 --- a/README.md +++ b/README.md @@ -27,23 +27,18 @@
  • Rainbow logs with rich
  • Setup user auth
  • Local development with poetry
  • -
  • Import xlsx files with polars and calamine
  • +
  • Import xlsx files with polars and calamine
  • - -[//]: # (
  • Usage
  • ) - -[//]: # (
  • Roadmap
  • ) - -[//]: # (
  • Contributing
  • ) - -[//]: # (
  • License
  • ) - -[//]: # (
  • Contact
  • )
  • Acknowledgments
  • +[//]: # (TODO: Usage,Roadmap, Contributing, License, Contact) + + + + ## About The Project @@ -135,9 +130,11 @@ Hope you enjoy it. ### Import xlsx files with polars and calamine Power of Polars Library in data manipulation and analysis. +It uses the polars library to read the Excel data into a DataFrame by passing the bytes to the `pl.read_excel()` function - https://docs.pola.rs/py-polars/html/reference/api/polars.read_excel.html +In `pl.read_excel()` “calamine” engine can be used for reading all major types of Excel Workbook (.xlsx, .xlsb, .xls) and is dramatically faster than the other options, using the fastexcel module to bind calamine. - +

    (back to top)

    ## Acknowledgments Use this space to list resources you find helpful and would like to give credit to. @@ -164,7 +161,8 @@ I've included a few of my favorites to kick things off! - **[JUL 25 2023]** add user authentication with JWT and Redis as token storage :lock: :key: - **[SEP 2 2023]** add passlib and bcrypt for password hashing :lock: :key: - **[OCT 21 2023]** refactor shakespeare models to use sqlalchemy 2.0 :fast_forward: -- **[FEB 1 2024]** bum project to Python 3.12 :fast_forward: +- **[FEB 1 2024]** bump project to Python 3.12 :fast_forward: +- **[MAR 15 2024]** add polars and calamine to project :features:

    (back to top)

    diff --git a/app/api/nonsense.py b/app/api/nonsense.py index 7d9e33d..49422db 100644 --- a/app/api/nonsense.py +++ b/app/api/nonsense.py @@ -75,8 +75,6 @@ async def import_nonsense( HTTPException: If an error occurs during the process (either a SQLAlchemy error or an HTTP exception), the function rolls back the session and raises an HTTP exception with a 422 status code. """ - - try: # Read the uploaded file into bytes file_bytes = await xlsx.read()