Fyodorov Utils
fyodorov_-_utils is a Python library that provides a collection of utility functions and classes used across multiple
services within the Fyodorov project. The Fyodorov project is a suite of complementary services for working with
LLM-based agents.
The library defines standard practices and includes tooling around logging, error handling, and authentication, as well as configuration management.
Error handling
There is a decorator which will handle errors for FastAPI endpoints. It will also log those errors in a consistent fashion without any input required. It can be used like this:
from fyodorov_utils.decorators.logging import error_handler
@app.post
@error_handler
def endpoint():
return
Authentication
You can import the authentication helper like so:
from fyodorov_utils.auth.auth import authenticate
@app.post('/endpoint')
@error_handler
def create_provider(provider: ProviderModel, user = Depends(authenticate)):
return
This will require calls to that endpoint to be authenticated by the user's access token (which is a JWT). It also makes the user object available within the function for additional authentication or authorization logic.
Shared User Endpoints
There are certain endpoints around user actions that are shared functionality across all services. These include signing up, logging in, and creating API keys (which can be used for tools or third-party services). These endpoints are defined in the library and can be used like this:
# User endpoints
from fyodorov_utils.auth.endpoints import users_app
app.mount('/users', users_app)
Installation
You can install fyodorov_utils using pip:
pip install fyodorov-utils==0.2.11
Metadata
Release files for fyodorov-utils 0.4.52
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fyodorov_utils-0.4.52.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fyodorov_utils-0.4.52-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / fyodorov_utils-0.4.52.tar.gz
| Download URL | fyodorov_utils-0.4.52.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0263ceb8c7271ff4f60eac52ad70159ceb467029500645598e23d39b22f3eaa3
|
|
BLAKE2b-256 checksum How to use checksums |
867e21a68da130cb02ed17190efd9f1126bf53f57071aafe302ab585d5ef73fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / fyodorov_utils-0.4.52-py3-none-any.whl
| Download URL | fyodorov_utils-0.4.52-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
320b5f386cb277cce0808ea0cad2e3eb8d2652386ece625ecafa003c15137f1c
|
|
BLAKE2b-256 checksum How to use checksums |
7edfd4b32adb6584451dc4e3b6bc13b80c6c06afcfaff6e7b276b3782d7d34e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|