Skip to main content

Privacy-first AI cost tracking library

Project description

Fenra

Fenra Python SDK

PyPI Python License

FinOps platform for AI cost visibility

Usage

Install the package:

pip install fenra

Initialize and start tracking:

import fenra
from openai import OpenAI

fenra.init(api_key="your-fenra-api-key")

# Use as normal - costs are tracked automatically
client = OpenAI()
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}]
)

Works with Anthropic and Gemini the same way.

For custom providers or manual tracking:

fenra.track(
    provider="custom",
    model="my-model",
    input_tokens=100,
    output_tokens=50,
)

To disable auto-tracking:

export FENRA_DISABLE_AUTO_TRACK=1

Support

Privacy

Fenra is privacy-first by default. No prompts or responses are stored unless explicitly enabled.

License

The Fenra Python SDK is licensed under the Apache 2.0 License.

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

fenra-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fenra-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file fenra-0.1.0.tar.gz.

File metadata

  • Download URL: fenra-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fenra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 767843d90eb1c995861dffdfdf060411f6b83d850adda3ab97cd4a0ed087f5a1
MD5 5533e93d1fcfc0863360f65a15ef7b5e
BLAKE2b-256 9b21385ec7b16b9bd4c9f16605c0c1a1e8405ca942ea03fa4d5b7bed954b2f8b

See more details on using hashes here.

File details

Details for the file fenra-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fenra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fenra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f03df00d35bc8437031b41fa4f40e1864546f5426c59280fa6b2b7e7ee22fe6
MD5 5d60e41112397cffa22bf119435a7fc8
BLAKE2b-256 0bee30b39cf61b6e3bba0bb4c95d3f506f6c9205b429fa697cc2267c791251bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page