fastapirichlogger


Namefastapirichlogger JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/kevinqz/fastapirichlogger
SummaryAn awesome logger for FastAPI.
upload_time2024-07-14 23:28:37
maintainerNone
docs_urlNone
authorKevin Saltarelli
requires_pythonNone
licenseLICENSE.md
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastAPIRichLogger

## Description
FastAPIRichLogger is a robust and visually appealing logging system for FastAPI applications. Utilizing the power of the `rich` library, it enhances the standard logging capabilities with color-coded log levels, detailed request-response data, and a user-friendly format that improves both readability and debugging.

## Installation
Install FastAPIRichLogger with pip:

```bash
pip install fastapirichlogger
```

## Usage
To use FastAPIRichLogger in your FastAPI application, follow these steps:

1. **Import FastAPIRichLogger**:
   ```python
   from fastapirichlogger import FastAPIRichLogger
   ```

2. **Add Middleware to FastAPI**:
   ```python
   app = FastAPI()
   app.add_middleware(FastAPIRichLogger)
   ```

## Features
- **Color-Coded Logging**: Easily distinguish between different log levels thanks to color coding.
- **Request-Response Details**: Logs include detailed information about HTTP requests and responses.
- **Execution Time Tracking**: Monitor the time taken for each request to process.
- **Automatic Log ID Assignment**: Each request gets a unique log identifier for easier tracking.

## Example Images

Below are example images showing the FastAPIRichLogger in action:

- **Success Log Example**:
  ![Success Log](https://gcdnb.pbrd.co/images/CNZuN81Gf4Hn.png)

- **Error Log Example**:
  ![Error Log](https://gcdnb.pbrd.co/images/QfpPhSLCf1Xy.png)

## Contributing
Contributions are what make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License
Distributed under the MIT License. See `LICENSE.md` for more information.

## Contact
Kevin Saltarelli - kevinqz@gmail.com

Project Link: [https://github.com/kevinqz/fastapirichlogger](https://github.com/kevinqz/fastapirichlogger)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kevinqz/fastapirichlogger",
    "name": "fastapirichlogger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Kevin Saltarelli",
    "author_email": "kevinqz@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/35/0d/e8cc27761857c95ce179f28c837e3d2007af4277c739157f3d56dcb464e8/fastapirichlogger-0.1.4.tar.gz",
    "platform": null,
    "description": "# FastAPIRichLogger\n\n## Description\nFastAPIRichLogger is a robust and visually appealing logging system for FastAPI applications. Utilizing the power of the `rich` library, it enhances the standard logging capabilities with color-coded log levels, detailed request-response data, and a user-friendly format that improves both readability and debugging.\n\n## Installation\nInstall FastAPIRichLogger with pip:\n\n```bash\npip install fastapirichlogger\n```\n\n## Usage\nTo use FastAPIRichLogger in your FastAPI application, follow these steps:\n\n1. **Import FastAPIRichLogger**:\n   ```python\n   from fastapirichlogger import FastAPIRichLogger\n   ```\n\n2. **Add Middleware to FastAPI**:\n   ```python\n   app = FastAPI()\n   app.add_middleware(FastAPIRichLogger)\n   ```\n\n## Features\n- **Color-Coded Logging**: Easily distinguish between different log levels thanks to color coding.\n- **Request-Response Details**: Logs include detailed information about HTTP requests and responses.\n- **Execution Time Tracking**: Monitor the time taken for each request to process.\n- **Automatic Log ID Assignment**: Each request gets a unique log identifier for easier tracking.\n\n## Example Images\n\nBelow are example images showing the FastAPIRichLogger in action:\n\n- **Success Log Example**:\n  ![Success Log](https://gcdnb.pbrd.co/images/CNZuN81Gf4Hn.png)\n\n- **Error Log Example**:\n  ![Error Log](https://gcdnb.pbrd.co/images/QfpPhSLCf1Xy.png)\n\n## Contributing\nContributions are what make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\nDistributed under the MIT License. See `LICENSE.md` for more information.\n\n## Contact\nKevin Saltarelli - kevinqz@gmail.com\n\nProject Link: [https://github.com/kevinqz/fastapirichlogger](https://github.com/kevinqz/fastapirichlogger)\n",
    "bugtrack_url": null,
    "license": "LICENSE.md",
    "summary": "An awesome logger for FastAPI.",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/kevinqz/fastapirichlogger"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42aa5f148a20d0b0f3eb849a8963f065691b83810aff3e7c87bb56007e2b0e89",
                "md5": "1306d4293fd0957140300b0be878b77c",
                "sha256": "792c50633e8ea9b0027b5f3934e565677343cf7926410f0afb8064e0cfaa11a3"
            },
            "downloads": -1,
            "filename": "fastapirichlogger-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1306d4293fd0957140300b0be878b77c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4850,
            "upload_time": "2024-07-14T23:28:36",
            "upload_time_iso_8601": "2024-07-14T23:28:36.126197Z",
            "url": "https://files.pythonhosted.org/packages/42/aa/5f148a20d0b0f3eb849a8963f065691b83810aff3e7c87bb56007e2b0e89/fastapirichlogger-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "350de8cc27761857c95ce179f28c837e3d2007af4277c739157f3d56dcb464e8",
                "md5": "e8a3d8982cc25739cd090e19a64899be",
                "sha256": "4f4d1d76c2736d011361f433111b0e81769edec7ae20c01c71da70f41ad77520"
            },
            "downloads": -1,
            "filename": "fastapirichlogger-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e8a3d8982cc25739cd090e19a64899be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4136,
            "upload_time": "2024-07-14T23:28:37",
            "upload_time_iso_8601": "2024-07-14T23:28:37.726234Z",
            "url": "https://files.pythonhosted.org/packages/35/0d/e8cc27761857c95ce179f28c837e3d2007af4277c739157f3d56dcb464e8/fastapirichlogger-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-14 23:28:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kevinqz",
    "github_project": "fastapirichlogger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fastapirichlogger"
}
        
Elapsed time: 0.27116s