Skip to main content

Official CurrencyCore API client - currency conversion, FX rates, PPP, and analytics.

Project description

CurrencyCore SDK for Python

Official client for the CurrencyCore API — currency conversion, FX rates, PPP, and analytics.

Generated from the CurrencyCore OpenAPI 3.1 spec with OpenAPI Generator (python, urllib3), plus a thin create_client helper for API-key and version handling.

Install

pip install currencycore

Quickstart

from currencycore.client import create_client

api = create_client(api_key="cc_live_...")  # or set CURRENCYCORE_API_KEY
res = api.convert(var_from="USD", to="EUR", amount=100)
print(res.results[0])

var_from carries the var_ prefix because from is a reserved word in Python.

Public reference endpoints need no key:

api = create_client()
print(api.currencies())

API key

create_client resolves the key as api_keyCURRENCYCORE_API_KEY.

API version

Base URL is https://api.currency-core.com/{version} (default v1):

create_client(version="v1")
create_client(base_url="https://api.currency-core.com/v1")

Low-level client

import currencycore

config = currencycore.Configuration(
    host="https://api.currency-core.com/v1", access_token="cc_live_..."
)
api = currencycore.CurrencyCoreApi(currencycore.ApiClient(config))

Regenerate

The committed openapi.json is the source of truth:

bash scripts/generate.sh

Hand-written files (currencycore/client.py, this README) are protected by .openapi-generator-ignore.

License

MIT

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

currencycore-0.1.0.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

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

currencycore-0.1.0-py3-none-any.whl (78.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: currencycore-0.1.0.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for currencycore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5a342925974f85e73534a761c61720047b6b4836836c0c79e3c8ff8ee6b0e0a4
MD5 8e5e018f233dd2e3d4a938643355d575
BLAKE2b-256 5e2ff63a87f15d7acfc28e26342ff43efbb75c9b84990cbea3075742d06fd4c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for currencycore-0.1.0.tar.gz:

Publisher: ci.yml on CurrencyCore/currencycore-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: currencycore-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 78.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for currencycore-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55fb197c333f6867c6e8aa01580639eef810f942f81003149ad517459c82f43a
MD5 a5a0dffea0c0da9bb17c9732e87c8ace
BLAKE2b-256 b090b3ebf93895f66c99d5d94e3d5faae15bcdcbdcda33eaed92b093354eb640

See more details on using hashes here.

Provenance

The following attestation bundles were made for currencycore-0.1.0-py3-none-any.whl:

Publisher: ci.yml on CurrencyCore/currencycore-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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