Skip to main content

A Python package to retrieve financial data from official sources.

Project description

FinDrum

FinDrum is a modular Python package for collecting, processing, and storing financial data from sources like the SEC and Yahoo Finance. It is designed with extensibility, testability, and backend independence in mind — ideal for building robust local or cloud-based data pipelines.


🚀 Features

  • 🧾 Fetch structured financial data from SEC EDGAR company facts
  • 📊 Historical market data via Yahoo Finance
  • 💾 Read/write Parquet files through an abstracted DataClient
  • 📦 Built-in clients for local storage and MinIO (S3-compatible) object storage
  • 🧪 Fully typed and tested with pytest and pytest-cov

📦 Installation

pip install .  # for regular use
pip install .[dev]  # for development with tests and coverage

📂 Project Structure

findrum/
├── clients/         # Abstract DataClient + Local and MinIO implementations
├── crawlers/        # Abstract Crawler + SEC and Yahoo Finance crawlers
├── readers/         # ParquetReader
├── writers/         # ParquetWriter

🔍 Example: Full Workflow — SEC Crawler + Local Parquet Writer

from findrum.crawlers.sec_crawler import SecCrawler
from findrum.clients.local_client import LocalDataClient
from findrum.writers.parquet_writer import ParquetWriter

client = LocalDataClient()
writer = ParquetWriter(client)

crawler = SecCrawler(email="oscar.rico101@alu.ulpgc.es")

for raw_data in crawler.fetch():
    if raw_data.empty:
        continue

    cik = raw_data.iloc[0]["cik"]
    object_path = f"./datalake/{cik}/company_facts.parquet"
    writer.write(object_path, raw_data)

✨ Other Examples

Yahoo Finance Crawler

from findrum import YahooCrawler

crawler = YahooCrawler(period="1mo")
for df in crawler.fetch(["AAPL", "GOOGL"]):
    print(df.head())

Parquet Reader

from findrum.clients.local_client import LocalDataClient
from findrum.readers.parquet_reader import ParquetWriter

client = LocalDataClient()
reader = ParquetReader(client)
df = reader.read("./datalake/0000320193/company_facts.parquet")
print(df.head())

🧪 Running Tests

python -m pytest --cov=findrum --cov-report=term-missing

📄 License and Attribution

This project includes components licensed under the Apache License 2.0 and other permissive open source licenses.

Portions of this software incorporate third-party libraries, including:

These libraries are licensed under the Apache License, Version 2.0.

See the LICENSE file for full license texts and additional legal information.

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

findrum-1.0.5.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

findrum-1.0.5-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file findrum-1.0.5.tar.gz.

File metadata

  • Download URL: findrum-1.0.5.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for findrum-1.0.5.tar.gz
Algorithm Hash digest
SHA256 4d74644a29a2c7642826d737ea659a7ed8f9179f3e8be0603bd1fff4a12f264f
MD5 9743d1c2ee34908040aecb80f2cfb458
BLAKE2b-256 c18cf112898e8ba59703c9c5519ed965436e6e41ad15c7a865979e83230e3f43

See more details on using hashes here.

File details

Details for the file findrum-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: findrum-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for findrum-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6901b29ec7c9fb6bf8d9c268c2b2b1851598b7c7efa864ab351bde0ff4ad49b0
MD5 462b9801ad90ddf31216ff73f5599eb9
BLAKE2b-256 f719facc44012bf0863ed442f80e73ea5036d31ab625659a6bc27442bfacd9a0

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