Financial Reports Python SDK
Official Python SDK for the Financial Reports API. Access European financial filings and company data programmatically.
Installation
pip install financial-reports
Quick Start
import asyncio
from financial_reports import FinancialReportsClient
async def main():
# Initialize client with API key
client = FinancialReportsClient(api_key="your-api-key")
try:
# Get filings for a specific company
filings = await client.list_filings(company_isin="FR0000073298")
print(f"Found {filings['count']} filings")
# Get German companies
companies = await client.list_companies(countries="de")
print(f"Found {companies['count']} German companies")
# Use utility functions
sap_isin = await client.get_primary_isin_by_name("SAP")
print(f"SAP ISIN: {sap_isin}")
finally:
await client.close()
# Run the async function
asyncio.run(main())
Features
- Full async/await support using aiohttp
- Complete coverage of API endpoints:
- Filings (list, get)
- Companies (list, get)
- Filing Types (list, get)
- Sources (list, get)
- Sectors (list, get)
- Industry Groups (list, get)
- Industries (list, get)
- Sub-Industries (list, get)
- Utility functions for company lookup
- Built-in pagination handling
- Proper error handling
- Type hints for better IDE integration
Authentication
The client requires an API key that can be provided in two ways:
- Environment variable:
export FINANCIAL_REPORTS_API_KEY="your-api-key"
- Direct initialization:
client = FinancialReportsClient(api_key="your-api-key")
API Reference
Filings
# List filings with filters
filings = await client.list_filings(
company_isin="FR0000073298",
countries="de",
language="en",
added_to_platform_from="2024-01-01",
page=1,
page_size=50
)
# Get specific filing
filing = await client.get_filing(filing_id=123)
Companies
# List companies with filters
companies = await client.list_companies(
countries="de",
sector=45, # Technology
page=1,
page_size=50
)
# Get specific company
company = await client.get_company(company_id=456)
# Utility functions
isin = await client.get_primary_isin_by_name("SAP")
ticker = await client.get_ticker_by_name("SAP")
Industries & Sectors
# List all sectors
sectors = await client.list_sectors()
# Get industry groups in a sector
groups = await client.list_industry_groups()
# Get specific industry
industry = await client.get_industry(industry_id=789)
Error Handling
The client includes built-in error handling for common scenarios:
try:
filings = await client.list_filings()
except ValueError as e:
if "Invalid API key" in str(e):
print("Authentication failed")
elif "Insufficient permissions" in str(e):
print("API key doesn't have required permissions")
else:
print(f"API error: {e}")
Development
- Clone the repository:
git clone https://github.com/financial-reports/financial-reports-python.git
cd financial-reports-python
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install in development mode:
pip install -e .
License
MIT License. See LICENSE file for details.
Metadata
Release files for financial-reports 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| financial_reports-0.1.0.tar.gz | 8.5 kB | Without provenance | Details for financial_reports-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| financial_reports-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for financial_reports-0.1.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / financial_reports-0.1.0.tar.gz
| Download URL | financial_reports-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ef1cbd4fe6974beef48469e7e87b736f1bc56aeb60dd57da58eb9271890c2a1
|
|
BLAKE2b-256 checksum How to use checksums |
5a3591593cb10583908024909bdc82e2b5a3ab0fd48f28555f765df741d106c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.11
|
Release files / financial_reports-0.1.0-py3-none-any.whl
| Download URL | financial_reports-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ea08716fe0ae8e5e558658ebc71a5d8ebd8aeabeb3a266f6cc366fd08faca9f
|
|
BLAKE2b-256 checksum How to use checksums |
73d02e83fb51194485260caec5a41d40975ead5b8bded5e4fd608a5dae476316
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.11
|
Security for financial-reports 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.