Skip to main content

...

Project description

pyaddepar

Some utility code for interacting with addepar. For more information on addepar please check out https://addepar.com/.

Installing pyaddepar

Install with pip

pip install pyaddepar

AddeparRequest

AddeparRequest is a class hiding the management of your key(s), the pagination of requests and conversion of your results to standard pandas containers.

import pandas as pd
from pyaddepar.addeparrequest import AddeparRequest

if __name__ == '__main__':
    r = AddeparRequest(key=..., secret=..., id=..., company=...)
    today = pd.Timestamp("today")

    for key, entity in r.options:
        expiry = pd.Timestamp(entity["expiration_date"])
        if expiry >= today:
            print(expiry)
            print(entity)
            print(entity["option_type"])
            print(entity["node_strike_price"])

            print((expiry-today).days/365.0)

Settings.cfg

We recommend to define a configuration file (*.cfg) containing

ADDEPAR = {"key":"A", "secret":"B", "id":"maffay", "company":"maffay" }

Flask-Addepar

A Flask extension that provides integration with Addepar. In particular this flask extension provides management of your AddeparRequests. You can use configuration files such as settings.cfg to follow standard flask practices. The configuration is easy, just fetch the extension:

from flask import Flask

from pyaddepar.flask_addepar import addepar

if __name__ == '__main__':
    app = Flask(__name__)
    app.config.from_pyfile('config/settings.cfg')
    addepar.init_app(app)

    with app.app_context():
        for key, entity in addepar.request.entities():
            print(key)
            print(entity)

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

pyaddepar-0.12.0.tar.gz (370.5 kB view details)

Uploaded Source

Built Distribution

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

pyaddepar-0.12.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pyaddepar-0.12.0.tar.gz.

File metadata

  • Download URL: pyaddepar-0.12.0.tar.gz
  • Upload date:
  • Size: 370.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyaddepar-0.12.0.tar.gz
Algorithm Hash digest
SHA256 a36a11826ac76e5984fd531abd863915aea565445155bfe2862c949037584278
MD5 e7acb2a960fad273a1a58d45e2b26105
BLAKE2b-256 738e20929cc263b504ab2ff0ec48d5fa422f0665053594afc1286a5dd51e9b93

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaddepar-0.12.0.tar.gz:

Publisher: release.yml on lobnek/pyaddepar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaddepar-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pyaddepar-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyaddepar-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a01323cd0593669823b8966181c3529d67378207323eb69f76e5c705d9e63a3
MD5 0365dc47f64154eab7b403d277fb58b7
BLAKE2b-256 487fa64d486646a44b4d5fb5f6b42c2a557e79c625626ac8355359626155d963

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaddepar-0.12.0-py3-none-any.whl:

Publisher: release.yml on lobnek/pyaddepar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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