Client for consuming Accern data feeds.
Project description
Accern Data Library
Client library for consuming Accern data feed API.
Installation:
pip install accern-data
Sample snippet:
>>> import accern_data
# Create a data client.
>>> client = accern_data.create_data_client("http://api.example.com/", "SomeRandomToken")
# Set a data format/mode in which the data has to be downloaded.
>>> client.set_mode("csv_date") # Other modes: {"csv_full", "json"}
Set filters:
>>> client.set_filters({
"provider_ID": Optional[str],
"entity_name": Optional[str],
"event": Optional[str],
"entity_ticker": Optional[str],
"entity_accern_id": Optional[str],
})
Set parameters to the download function:
>>> client.download_range(
start_date="2022-01-03",
output_path="./",
output_pattern="data",
end_date="2022-03-04")
Note: To download single day's data, set end_date=None
or can leave that unset:
>>> client.download_range(
start_date="2022-01-03",
output_path="./",
output_pattern="data",
end_date=None)
OR
>>> client.download_range(
start_date="2022-01-03",
output_path="./",
output_pattern="data")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
accern_data-0.0.1.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for accern_data-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa77042a1e8cca2c68b87d74fd581dcfeaaf2d82748302bbfad62ea1fe795fd0 |
|
MD5 | f563c6ba2dde42c0f095f0846ffb604c |
|
BLAKE2b-256 | bcdcc08fd0c22389f89dfe5030acc77b25b2be92343a0bfce99d35215fc45a4e |