logger for LLM conversations
Project description
OmniLog Python Package
Welcome to the OmniLog Python Package! This document provides a step-by-step guide to get you started with setting up, managing dependencies, running tests, and publishing the package to PyPI using Poetry.
Table of Contents
Requirement
Make sure you have Poetry installed on your local machine. If not, follow the instruction on https://python-poetry.org/docs/.
Managing Dependencies
-
Adding Dependencies: Add any new project dependencies to [tool.poetry.dependencies] using:
poetry add <package>
-
Development Dependencies: For development dependencies, add them to the group [tool.poetry.dev.dependencies] using:
poetry add <dev-package> --group dev
-
Install Dependencies: Run the following command to install project dependencies:
poetry install
Running Python Files
-
Activate Virtual Environment: The virtual environment ensures that the correct dependencies are available to your script.To activate it, run the command:
poetry shell -
Running Scripts: Once the environment is up, you can run:
poetry run python <filepath>
Tip
To avoid having to type poetry run every time you want to run a script, you can use the poetry run command once at the beginning of your terminal session. This sets up an environment where all subsequent python commands are run within the Poetry virtual environment.
poetry run
Now you can simply use python path/to/your/script.py without the need for poetry run each time.
Running Tests
-
Running Tests: Use the following command to run pytest:
poetry run pytest
-
Writing Tests: Create test files in the test directory, e.g., test/send_to_db.test.py, and write your tests using pytest.
Configuring PyPI User
Configure the PyPI user credentials using the following command (Replace <YOUR_PYPI_TOKEN> with the actual PyPI token):
poetry config pypi-token.pypi <YOUR_PYPI_TOKEN>
Publishing to PyPI
-
Building: Use the following command to build the package:
poetry build -
Publishing: Publish the package to PyPI using:
poetry publishtip: Add the --build flag to do both steps at once.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omnilogger-0.0.1.tar.gz.
File metadata
- Download URL: omnilogger-0.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.6 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77c61cfc3bce74ea388005354ea0be7aa5d2097bc5d7c7aaca0584f53bdf8628
|
|
| MD5 |
f9576c91d09bab5daa70d3d36f789090
|
|
| BLAKE2b-256 |
fc8ab79464931d0b060b0f806ed9143e46dd85a6eaeb986ea3075766fada7c6a
|
File details
Details for the file omnilogger-0.0.1-py3-none-any.whl.
File metadata
- Download URL: omnilogger-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.6 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11017c6da32367cf4e60e57654b9241b23e690e5cb0557236e66a4ec53c817b0
|
|
| MD5 |
114dc2a0feb32126e84bbd165d65a127
|
|
| BLAKE2b-256 |
96d58b29844480f9df8d464da345594730be868ee13eadfc7b3b0e53f621f9ba
|