Skip to main content

FinOps platform for AI cost visibility

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.1.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.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fenra-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fe9ab6db1beadfdd83a791d40a56d6c3027a31645daea9a30d2a83772e8fc089
MD5 989a70d757a16eb149ac1b018dc0d223
BLAKE2b-256 15d002f372967dd092ee73daa3f47a13fd9700c6e5b8d8e71f318979ac4d3285

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fenra-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63da3aac28ea7de29ef32b53ac51c24c0e9e22a05a038ff093088dcb897cae45
MD5 8af73b3721830fc33f8a70ba59bb9f2a
BLAKE2b-256 c196893b5b5332aa874e755fe3f706fe708e28dbceed8265edc71f6e0c630fff

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