Skip to main content

AT Common Functions

A Python package providing common asynchronous task definitions and utilities for workflow operations.

Installation

pip install at_common_functions

Usage

Database Storage Initialization

from at_common_functions import init_storage

# Initialize storage connection
storage = init_storage(
    host="localhost",
    port=3306,
    user="user",
    password="password",
    database="dbname"
)

Stock Data Operations

from at_common_functions.stock import (
    stock_get_overview,
    stock_get_quotation,
    stock_get_candlesticks,
    stock_get_indicators,
    stock_get_financials
)

async def main():
    # Get stock overview
    overview = await stock_get_overview("AAPL")
    print(overview) # Contains symbol, name, sector, etc.

    # Get current quotation
    quotation = await stock_get_quotation("AAPL")
    print(quotation) # Contains price, volume, timestamp
    
    # Get daily candlesticks
    candlesticks = await stock_get_candlesticks("AAPL", "daily", limit=5)
    print(candlesticks) # List of candlesticks with OHLCV data
    
    # Get technical indicators
    indicators = await stock_get_indicators("AAPL", "daily", limit=5)
    print(indicators) # List of indicators (SMA, RSI, etc.)
    
    # Get financial statements
    financials = await stock_get_financials(
        symbol="AAPL",
        period="annual", # or "quarterly"
        statement="income", # or "balance_sheet", "cash_flow"
        limit=3
    )
    print(financials)

Development

  1. Clone the repository
  2. Create a virtual environment: python -m venv venv
  3. Activate the virtual environment
  4. Install development dependencies: pip install -e ".[dev]"
  5. Run tests: pytest

Dependencies

  • Python >= 3.11
  • at_common_workflow >= 1.1.15
  • SQLAlchemy >= 2.0.36
  • at-common-models >= 0.1.3
  • aiomysql >= 0.2.0
  • greenlet >= 3.0.3

Development Dependencies

  • pytest >= 8.3.4
  • pytest-asyncio >= 0.24.0

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for at-common-functions 1.0.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for at-common-functions 1.0.26
File Size Uploaded Provenance Actions
at_common_functions-1.0.26.tar.gz 18.9 kB Without provenance Details for at_common_functions-1.0.26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for at-common-functions 1.0.26
File Interpreter ABI Platform Actions
at_common_functions-1.0.26-py3-none-any.whl Python 3 none any Details for at_common_functions-1.0.26-py3-none-any.whl

Total release size: 35.3 kB

Release files / at_common_functions-1.0.26.tar.gz

Download URL at_common_functions-1.0.26.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c544eca6f9c0d8d4c57e96ab5801fb6074d0f8167a8a4910bbf40357170e5670
BLAKE2b-256 checksum
How to use checksums
a7f58829ba96c34252ffa82dfadb2e083fef1d108681decc19b8046726d9c62c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / at_common_functions-1.0.26-py3-none-any.whl

Download URL at_common_functions-1.0.26-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
591f1f7dbce314a43523c40c1a4932c5932b97eb6a2b740a8f6f5f880d34508e
BLAKE2b-256 checksum
How to use checksums
0a940487117b5e6e797fc802391561c9513d2634dce3e3c4881e3f3914b218ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for at-common-functions 1.0.26

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.

Release history Release notifications | RSS feed

This release

1.0.26 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page