Skip to main content

SecParse API SDK for Python (secparse.com)

Project description

SecParse SDK

Python SDK for SecParse - Query and subscribe to SEC EDGAR filing data via GraphQL.

Installation

pip install secparse

API Key

Get your API key at https://secparse.com

Quick Start

Basic Query

import asyncio
from secparse import SecParseClient

async def main():
    async with SecParseClient(api_key="your-api-key") as client:
        result = await client.query("""
            query {
              Fact(
                where: {
                  Concept: {name: {_eq: "Assets"}, namespace: {_eq: "us-gaap"}}
                  Submission: {filerCik: {_eq: "63908"}}
                }
                limit: 5
              ) {
                effectiveDate
                valueNumber
                Submission {
                  Filer { name }
                }
              }
            }
        """)
        print(result)

asyncio.run(main())

Real-time Subscriptions

import asyncio
from secparse import SecParseClient

async def main():
    client = SecParseClient(api_key="your-api-key")

    try:
        async for data in client.subscribe("""
            subscription {
              Submission(where: {Filer: {cik: {_eq: "63908"}}}) {
                accessionNumber
                acceptedDate
              }
            }
        """):
            print(f"New submission: {data}")
    finally:
        await client.close()

asyncio.run(main())

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

secparse-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

secparse-0.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file secparse-0.1.1.tar.gz.

File metadata

  • Download URL: secparse-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for secparse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d6eb6ad64ab2320b2afbeaef2499bf75bba981cec9764197ac6590131be03f67
MD5 fdb65c2dd6ad6e7730fc4bfb9952d1ef
BLAKE2b-256 c387660e92161dad01b56a19a434ab2f3eb3773289e32fc47b95d972fe1e74ac

See more details on using hashes here.

File details

Details for the file secparse-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: secparse-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for secparse-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d920bda48c10c3716646b4408557f3b4c3cc5ae0b066d0742540d479ca0796ce
MD5 ed9be99084408b36fc955bbd0df8c3ab
BLAKE2b-256 d70d1882a6018ba6bbb9d6faf1d0427d22d05f7ef17427b1c6c41e36d65c1c2f

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