Metadata-Version: 2.1
Name: msaBase
Version: 0.0.126
Summary: General Package for Microservices based on FastAPI like Profiler, Scheduler, Sysinfo, Healtcheck, Error Handling etc.
Author: Stefan Welcker
Requires-Python: >=3.9.0,<3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: Jinja2 (==3.1.2)
Requires-Dist: Starlette-WTF (==0.4.3)
Requires-Dist: addict (==2.4.0)
Requires-Dist: aiofiles (==23.1.0)
Requires-Dist: aiohttp (==3.8.4)
Requires-Dist: anyio (==3.7.1)
Requires-Dist: apscheduler (==3.10.0)
Requires-Dist: autoflake (==2.0.1)
Requires-Dist: black (==22.6.0)
Requires-Dist: colorama (==0.4.6)
Requires-Dist: confluent-kafka (>=2.3.0,<3.0.0)
Requires-Dist: fastapi[all] (==0.86.0)
Requires-Dist: fastapi_utils (==0.2.1)
Requires-Dist: flake8 (==6.0.0)
Requires-Dist: fs (==2.4.16)
Requires-Dist: gputil (==1.4.0)
Requires-Dist: hjson (==3.1.0)
Requires-Dist: httpx (==0.23.3)
Requires-Dist: isort (==5.12.0)
Requires-Dist: loguru (==0.6.0)
Requires-Dist: lxml (==4.9.2)
Requires-Dist: msaDocModels (==0.0.112)
Requires-Dist: msaFileSystem (==0.0.8)
Requires-Dist: msgpack-asgi (==1.1.0)
Requires-Dist: mypy (==1.0.0)
Requires-Dist: orjson (==3.8.3)
Requires-Dist: prometheus_fastapi_instrumentator (==5.9.1)
Requires-Dist: psutil (==5.9.4)
Requires-Dist: pydantic[dotenv,email] (==1.9.2)
Requires-Dist: pyinstrument (==4.4.0)
Requires-Dist: pymongo (==4.3.3)
Requires-Dist: pyproject-flake8 (==6.0.0)
Requires-Dist: pytest (==7.2.0)
Requires-Dist: pytest-asyncio (==0.20.2)
Requires-Dist: pytest-mock (==3.10.0)
Requires-Dist: sentry-sdk (==1.24.0)
Requires-Dist: setuptools (==67.6.1)
Requires-Dist: slowapi (==0.1.7)
Requires-Dist: starception (==0.4.1)
Requires-Dist: starlette (==0.20.4)
Requires-Dist: starlette-context (==0.3.5)
Requires-Dist: uvicorn (==0.18.3)
Requires-Dist: uvloop (==0.17.0)
Description-Content-Type: text/markdown

<p align="center">
  <img src="http://logos.u2d.ai/msaBase_logo.png?raw=true" alt="msaBase
</p>

------
<p align="center">
    <em>msaBase- General Package for Microservices based on FastAPI like Profiler, Scheduler, Sysinfo, Healtcheck, Error Handling etc.</em>
<br>
    Optimized for use with FastAPI/Pydantic.
<br>
  <a href="https://pypi.org/project/msaBase" target="_blank">
      <img src="https://img.shields.io/pypi/v/msaBase?color=%2334D058&label=pypi%20package" alt="Package version">
  </a>
  <a href="https://pypi.org/project/msaBase" target="_blank">
      <img src="https://img.shields.io/pypi/pyversions/msaBase.svg?color=%2334D058" alt="Supported Python versions">
  </a>
</p>

------

**Documentation**: <a href="https://msaBase.u2d.ai/" target="_blank">Documentation (https://msaBase.u2d.ai/)</a>

------

## Features
- **MSABaseExceptionHandler**: Central exception handler which sends formatted exception to logger
- **Filehandler utilities**: Classes for FileDelete, FileUpload async with chunking, Archive pack/unpack formats, helper functions
- **mkdocs code reference helper**: Create virtual mkdocs navs for code reference and used libraries from requirements.txt
- **MSAHealthCheck**: Healthcheck class with internal own thread, which checks url for health
- **logger intercept handler**: allows to change handler from all logger and define specific output format with loguru
- **Models for files and health classes**: reusable pydantic models for file handling and dealing with healthcheck status
- **MSAProfilerMiddleware**: PyInstrument Profiler as Middleware to create a html for an admin Dashboard
- **MSAAppSettings**: API oriented settings class with environment vars and `.env` file support
- **Service oriented System Info**: Classes and functions to get pydantic model response about system and gpu information

## License Agreement

- `msaBase`Based on `MIT` open source and free to use, it is free for commercial use, but please show/list the copyright information about msaBase somewhere.


## How to create the documentation

We use mkdocs and mkdocsstring. The code reference and nav entry get's created virtually by the triggered python script /docs/gen_ref_pages.py while ``mkdocs`` ``serve`` or ``build`` is executed.

### Requirements Install for the PDF creation option:
PDF Export is using mainly weasyprint, if you get some errors here pls. check there documentation. Installation is part of the msaBase, so this should be fine.

We can now test and view our documentation using:

    mkdocs serve

Build static Site:

    mkdocs build


## Build and Publish
  
Build:  

    python setup.py sdist

Publish to pypi:

    twine upload dist/*

