ROSNIK Python SDK
Project description
rosnik-python
Getting started
Install
pip install --upgrade rosnik
Configuration
Then in your application code:
import rosnik
rosnik.init(api_key="api-key", environment="development")
Environment Variables
Please note that environment variables will override configuration values passed in via initialization.
# This is required to authenticate against our event ingestion tier
ROSNIK_API_KEY=
# This is optional and will mark events to the application environment (e.g. development, staging, production).
# If not supplied, it will go into a default environment.
ROSNIK_ENVIRONMENT=
# Setting this to 1 will send events on the foreground thread.
# If it's not supplied or set to 0, it will send events on a
# background thread.
ROSNIK_SYNC_MODE=
Integrations
Please let us know if there are other providers that would be helpful to have automatic instrumentation.
AI Providers
- OpenAI: we support tracking Completion and ChatCompletion creations
Web Frameworks
Flask:
from rosnik import flask_rosnik
rosnik_extension = flask_rosnik.FlaskRosnik(api_key="api-key", environment="development")
# rosnik.init happens here
rosnik_extension.init_app(app)
Django:
# settings.py
MIDDLEWARE = [
# ...other middleware
'rosnik.frameworks.django.rosnik_middleware'
]
# The middleware pulls from settings on init.
ROSNIK_API_KEY="api-key"
ROSNIK_ENVIRONMENT="development"
License
Licensed under the MIT license. See LICENSE.
Interested in learning more?
Send us an email at hello@rosnik.ai!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rosnik-0.0.34.tar.gz
(11.4 kB
view details)
Built Distribution
rosnik-0.0.34-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file rosnik-0.0.34.tar.gz
.
File metadata
- Download URL: rosnik-0.0.34.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a89d855ed52f92d5d1277c9db3db7e2b25f8c58e023eec6d41be3390e624c2a6 |
|
MD5 | 5b4726c1f8cd0f3823d8b2d89a4bbeed |
|
BLAKE2b-256 | a0f0fd0395cbdc618e4fe2ab82e736fd7f17709576cf10e59b0f268e6d53502f |
File details
Details for the file rosnik-0.0.34-py3-none-any.whl
.
File metadata
- Download URL: rosnik-0.0.34-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85e10c4350000494e8e20b17e560d015badbd17b42bc291e87c7724729897898 |
|
MD5 | 658058caafd124edfe797bc042381432 |
|
BLAKE2b-256 | 6e7eaa3b94f559837837f681a4f947532b8a9aa3650e575a998610d4d509fabc |