{"id":27207,"library":"openmeter","title":"OpenMeter Python Client","description":"A Python client for OpenMeter, a real-time and scalable usage metering service. This beta version (1.0.0b227) requires Python 3.9+ and is under active development. The library provides programmatic access to OpenMeter APIs for tracking and querying usage metrics.","status":"active","version":"1.0.0b227","language":"python","source_language":"en","source_url":"https://github.com/openmeter/openmeter","tags":["openmeter","metering","usage","client","api"],"install":[{"cmd":"pip install openmeter","lang":"bash","label":"Latest release"}],"dependencies":[],"imports":[{"note":"Common mistake: importing the package directly; the correct approach is to import the OpenMeter class.","wrong":"import openmeter","symbol":"OpenMeter","correct":"from openmeter import OpenMeter"}],"quickstart":{"code":"from openmeter import OpenMeter\n\nclient = OpenMeter(\n    base_url=\"http://localhost:8888\",\n    api_key=os.environ.get(\"OPENMETER_API_KEY\", \"\")\n)\n# Example: list all meters\ntry:\n    meters = client.meters.list()\n    print(meters)\nexcept Exception as e:\n    print(f\"Error: {e}\")","lang":"python","description":"Initialize the client with a base URL and API key (optional, retrieved from environment). Then call client.meters.list() to fetch meters."},"warnings":[{"fix":"client = OpenMeter(..., verify=False)","message":"The client uses httpx under the hood, which may cause SSL issues in some environments. If you encounter SSL errors, set verify=False in the OpenMeter constructor or configure custom SSL context.","severity":"gotcha","affected_versions":"all"},{"fix":"Set OPENMETER_API_KEY environment variable or pass api_key='your_key'.","message":"API keys are required for non-local setups. If you don't set an API key, requests might fail with 401 Unauthorized. Always provide an API key via environment variable or direct parameter.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin to a specific beta version and watch the changelog.","message":"The library is in beta (1.0.0b227) and APIs may change without notice. Methods and parameters might be deprecated or removed in future minor versions.","severity":"deprecated","affected_versions":"1.0.0b*"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from openmeter import OpenMeter","cause":"Using import openmeter directly instead of importing the class.","error":"import openmeter"},{"fix":"Correct import: from openmeter import OpenMeter","cause":"Trying to instantiate OpenMeter without importing the correct symbol.","error":"openmeter.OpenMeter is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}