Metadata-Version: 2.4
Name: cupiu-bnr
Version: 0.1.1
Summary: Official BNR (National Bank of Romania) exchange rates — zero dependencies. Live rates & history at cupiu.ro.
Project-URL: Homepage, https://cupiu.ro
Project-URL: Live rates, https://cupiu.ro
Project-URL: Source, https://github.com/ionalexaai/cupiu-bnr
Project-URL: BNR data source, https://www.bnr.ro
Author: cupiu.ro
License: MIT
License-File: LICENSE
Keywords: bnr,cupiu,currency,curs bnr,curs valutar,eur,exchange rates,forex,romania,ron
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Romanian
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# cupiu-bnr

**Official [BNR](https://www.bnr.ro) (National Bank of Romania) exchange rates in Python — zero dependencies.**

Pulls the daily *curs valutar BNR* reference rates straight from the National
Bank's public feed. Pure standard library, works on Python 3.8+, installs in one
line. Built and maintained by the team behind **[cupiu.ro](https://cupiu.ro)** —
where you can see the same rates with live charts and the full 2005→today
history for humans.

> 👉 **Live rates, charts & history:** **[cupiu.ro](https://cupiu.ro)**

## Install

```bash
pip install cupiu-bnr
```

## Library

```python
import cupiu_bnr

rates = cupiu_bnr.latest()          # today's official reference rates
print(rates["EUR"].ron_per_unit)  # Decimal('5.2411')

# Convert between any two BNR-listed currencies (crossed via RON)
cupiu_bnr.convert(100, "EUR", "USD")

# History straight from the BNR archive
for day in cupiu_bnr.year(2024):
    print(day.date, day["EUR"].ron_per_unit)
```

Rates use `Decimal` (never floats — this is money) and normalise BNR's
`multiplier` convention automatically, so `HUF`, `JPY`, etc. are always
per-single-unit.

## Command line

```bash
cupiu-bnr                     # all of today's rates
cupiu-bnr EUR                 # 1 EUR = 5.2411 RON  (2026-07-15)
cupiu-bnr convert 100 eur ron # 100 EUR = 524.11 RON
# `cursbnr` works as an alias for the same command.
```

## Why

BNR publishes one official reference set per banking day (~13:00 Bucharest).
Every accounting workflow in Romania — PFA invoices (Art. 290 Cod fiscal),
importers, bookkeeping — needs that exact number. `cupiu-bnr` gives you it
programmatically; **[cupiu.ro](https://cupiu.ro)** gives you it in the browser
with charts, per-currency pages and the historical archive.

## Data & attribution

Source data © **[National Bank of Romania](https://www.bnr.ro)**, used under
their public data terms. This is an independent open-source client, not
affiliated with the BNR. Maintained by **[cupiu.ro](https://cupiu.ro)**.

## License

MIT — see [LICENSE](LICENSE).
