...
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 the 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
Built Distribution
File details
Details for the file pyaddepar-0.7.0.tar.gz
.
File metadata
- Download URL: pyaddepar-0.7.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/1.5.1 CPython/3.10.11 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cb3be2afb209ceb69d6f4988aaad6c2b76c2899303c7b09a19a1db284445eff |
|
MD5 | 87a18bef2beb21e9f710343c7092fadc |
|
BLAKE2b-256 | e0c461cbb289ca71f9430762b1089a23b60dbbd2d59a2bbe9fdebfd05501a9b5 |
File details
Details for the file pyaddepar-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: pyaddepar-0.7.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/1.5.1 CPython/3.10.11 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 697ff20896ebbeb4f9823890901b04e2e4ae661bb62aad345c27a20bbf449ac0 |
|
MD5 | 3fc0c52feafed6eb7c2c827cd8ac7ba7 |
|
BLAKE2b-256 | abef1b1cf0c81ae4ed35bc48844c3072352dc18631eab125485e82029c43602e |