Skip to main content

Python SDK for Reportify API - Financial data and document search

Project description

Reportify SDK for Python

Python SDK for Reportify API - Financial data and document search.

Installation

pip install reportify-sdk

Quick Start

from reportify_sdk import Reportify

# Initialize client
client = Reportify(api_key="your-api-key")

# Search documents
docs = client.search("Tesla earnings", num=10)
for doc in docs:
    print(doc["title"])

Features

Document Search

# General search across all categories
docs = client.search("revenue growth", num=10)

# Search specific document types
news = client.search_news("Apple iPhone", num=10)
reports = client.search_reports("semiconductor analysis", num=10)
filings = client.search_filings("10-K annual report", symbols=["US:AAPL"])
transcripts = client.search_transcripts("guidance", symbols=["US:TSLA"])

Stock Data (returns pandas DataFrame)

# Financial statements
income = client.stock.income_statement("US:AAPL", period="quarterly")
balance = client.stock.balance_sheet("US:AAPL")
cashflow = client.stock.cashflow_statement("US:AAPL")

# Price data
prices = client.stock.prices("US:AAPL", limit=30)
kline = client.stock.kline("US:TSLA", interval="1d", limit=100)

# Real-time quotes
quotes = client.stock.quote(["US:AAPL", "US:MSFT"])

# Company info
overview = client.stock.overview("US:AAPL")
shareholders = client.stock.shareholders("US:AAPL")

# Screening and calendar
stocks = client.stock.screener(market="US", min_market_cap=1e10)
earnings = client.stock.earnings_calendar(area="us", start_date="2024-01-01")

Timeline

# Get timeline for followed entities
companies = client.timeline.companies(num=20)
topics = client.timeline.topics(num=20)
institutes = client.timeline.institutes(num=20)
public_media = client.timeline.public_media(num=20)
social_media = client.timeline.social_media(num=20)

Knowledge Base

# Search user's uploaded documents
chunks = client.kb.search("quarterly revenue", folder_ids=["folder_id"])

Documents

# Get document content
doc = client.docs.get("doc_id")
summary = client.docs.summary("doc_id")

# List and search documents
docs = client.docs.list(symbols=["US:AAPL"], page_size=10)
chunks = client.docs.search_chunks("revenue breakdown", num=5)

Error Handling

from reportify_sdk import (
    Reportify,
    AuthenticationError,
    RateLimitError,
    NotFoundError,
    APIError,
)

try:
    docs = client.search("Tesla")
except AuthenticationError:
    print("Invalid API key")
except RateLimitError:
    print("Rate limit exceeded, please wait")
except NotFoundError:
    print("Resource not found")
except APIError as e:
    print(f"API error: {e.message}")

Configuration

client = Reportify(
    api_key="your-api-key",
    base_url="https://api.reportify.cn",  # Optional: custom API URL
    timeout=30.0,  # Optional: request timeout in seconds
)

Context Manager

with Reportify(api_key="your-api-key") as client:
    docs = client.search("Tesla")
    # Client will be closed automatically

License

MIT License - see LICENSE for details.

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

reportify_sdk-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

reportify_sdk-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reportify_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for reportify_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 541719062c0f040b1f1e7cabf68c8cf67ca099e4d47e9b4f8eccbf19667fb6e5
MD5 d49ea17d5015449abe45ff72678a173e
BLAKE2b-256 463deec05c2fbb9dc9232b100bba7a7d55bf259548d0adc5247a2c3d947b876b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reportify_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for reportify_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5184c55065ed7c91d22cea2eab2c880a6abaa583e209a30b6137e404dfc7eaa
MD5 0f8a2c59cc1a0e9deec51d55e3095a32
BLAKE2b-256 ba04e630132801439682407a83de3dc8ab63c3d4adb07d22ea2d5253af4ca5d5

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