|
| 1 | +# ZCS Python Core Library |
| 2 | + |
| 3 | +This repository contains the core python library developed by Madness Lab Team at Zucchetti Centro Sistemi. |
| 4 | + |
| 5 | +The library provides a `Logger` allowing the user to receive logging messages from Uvicorn and send them to Google Cloud. |
| 6 | + |
| 7 | +```text |
| 8 | +
|
| 9 | +░▒▓████████▓▒░░▒▓██████▓▒░ ░▒▓███████▓▒░ |
| 10 | + ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
| 11 | + ░▒▓██▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ |
| 12 | + ░▒▓██▓▒░ ░▒▓█▓▒░ ░▒▓██████▓▒░ |
| 13 | + ░▒▓██▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ |
| 14 | +░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ |
| 15 | +░▒▓████████▓▒░░▒▓██████▓▒░░▒▓███████▓▒░ |
| 16 | + |
| 17 | + |
| 18 | +░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓███████▓▒░ |
| 19 | +░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
| 20 | +░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
| 21 | +░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
| 22 | +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
| 23 | +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
| 24 | +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░ |
| 25 | + |
| 26 | + |
| 27 | + ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░░▒▓████████▓▒░ |
| 28 | +░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
| 29 | +░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
| 30 | +░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓██████▓▒░ |
| 31 | +░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
| 32 | +░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
| 33 | + ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░ |
| 34 | + |
| 35 | + |
| 36 | +``` |
| 37 | + |
| 38 | +## Usage |
| 39 | + |
| 40 | +### Requirements |
| 41 | + |
| 42 | +The library doesn't require directly third party dependencies. This will let you install only the requirements needed by the utils you will effectively use. |
| 43 | + |
| 44 | +### Use the library in your project |
| 45 | + |
| 46 | +To use the library from ZCS repository you need to have a valid access. |
| 47 | + |
| 48 | +Add the following line to the top of your `requirements.txt` file: |
| 49 | + |
| 50 | +```bash |
| 51 | +--extra-index-url https://europe-west1-python.pkg.dev/ai-accounting-405809/python/simple/ |
| 52 | +``` |
| 53 | + |
| 54 | +Then add the library `zcs-python-core` to the same file. |
| 55 | + |
| 56 | +In your code, you can import and use the library like this: |
| 57 | + |
| 58 | +```python |
| 59 | +from zcs.core.exception import ZCSException |
| 60 | +``` |
| 61 | + |
| 62 | +```python |
| 63 | +from zcs.core.logger import Logger |
| 64 | +``` |
| 65 | + |
| 66 | +## Local development |
| 67 | + |
| 68 | +### Run library tests |
| 69 | + |
| 70 | +If you want to run libraray tests against your local docker development environment, you can run: |
| 71 | + |
| 72 | +```bash |
| 73 | +./run.sh -t |
| 74 | +``` |
| 75 | + |
| 76 | +### Run tests in a dist docker image |
| 77 | + |
| 78 | +To be sure that anything is going the right way, you can run the library tests against a dist docker image. This will assure that anything is working properly in a fresh installed environment. |
| 79 | + |
| 80 | +```bash |
| 81 | +./run.sh -i |
| 82 | +``` |
| 83 | + |
| 84 | +### Other commands and help |
| 85 | + |
| 86 | +```bash |
| 87 | +./run.sh -h |
| 88 | +``` |
| 89 | + |
| 90 | +## Support |
| 91 | + |
| 92 | +[Claudio Cavina](mailto:c.cavina@zcscompany.com) |
| 93 | +[Michele Mondelli](mailto:m.mondelli@zcscompany.com) |
0 commit comments