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
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 rosnik-0.0.37.tar.gz.
File metadata
- Download URL: rosnik-0.0.37.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.10.13 Linux/6.2.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89fa7b8d373350eac35fe27219c428071d65462b013e1e162c2b62f6d0e84dde
|
|
| MD5 |
b1d048e1387fc6f8f288e4356ec107ba
|
|
| BLAKE2b-256 |
db016023105cc29376dcd50b4953d652c10535f649831c1d2e4b0a4aedd67656
|
File details
Details for the file rosnik-0.0.37-py3-none-any.whl.
File metadata
- Download URL: rosnik-0.0.37-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.10.13 Linux/6.2.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c23f7be87c80cd6879d89ed50e332f5aa288b10771fad665b12ee0d7b0b416
|
|
| MD5 |
c5a6364721ea877a920cbc7ba934ccbf
|
|
| BLAKE2b-256 |
a4e90e1f3f883e90b3e59521f59f0fa8dd045d88da0b7afac314909b9e9b2d1d
|