An aurastream_client library for interacting with the AuraStream API
Project description
AuraStream Client Library
The AuraStream Client Library is a Python package designed to interact with the AuraStream API to fetch financial data. This guide will walk you through the installation, configuration, and usage of the library.
Installation
Install the AuraStream Client Library using pip:
pip install aurastream_client
Usage
Here is a simple example of how to use the library to post data and get a response:
Example 1: Providing Input Data through User Input
If both API_KEY and data parameters are None, the user will be prompted to input the data:
from aurastream_client import get_data
# Execute the function without parameters
data, status_code = get_data()
print(data, status_code)
When prompted, enter the data in the following format (Please follow the format strictly):
Enter data: {'API_KEY': 'your_api_key_here', 'data': {'ticker_list': ['^GSPC'], 'start': '2020-01-01', 'end': '2023-01-01', 'source': 'yahoo', 'data_format': 'json'}}
Example 2: Passing Data through Parameters
Configuration
Before using the library, you need to set up your AuraStream API key. You can do this by setting an environment variable:
export AURASTREAM_API_KEY='your_api_key_here'
OR
You can directly pass the api_key and data as parameters:
from aurastream_client import get_api_key, get_data
# Ensure your API key is configured as per the Configuration section
api_key = get_api_key() # or use your own method to provide the API key
# Define your parameters to send in the POST request
data = {
'ticker_list': ['^GSPC'], # List of tickers to retrieve data for
"start": '2020-01-01', # Start date for data retrieval in any format
"end": '2023-01-01', # End date for data retrieval in any format
"source": 'yahoo',
# String specifying the data source. This should match the data provider you have linked with your account on the AuraStream web portal. Valid options depend on the providers you have configured and authorized.
"data_format": 'json' # Format of the data returned, options are 'json' and 'csv' only
}
# Execute the function with parameters
response_data, status_code = get_data(api_key, data)
print(response_data, status_code)
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any issues or inquiries, please contact our support team at support@aurastream.com.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aurastream_client-0.1.0.tar.gz.
File metadata
- Download URL: aurastream_client-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1f6484e9b251c06ba35a26e28f288b5f48e73cc1879682e9333c5c5e79a199
|
|
| MD5 |
ba11ec4412ba62aa2c8db0da0d2d6dea
|
|
| BLAKE2b-256 |
7a1126bd09b1c5f0f75626b7a7bae02939e5bc48fbcdaa0ee70bb590df702f99
|
File details
Details for the file aurastream_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aurastream_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3678f17ab47e5f32397ebd2ea3b7d819c7f515eabc524256ff43c3c3823f78b
|
|
| MD5 |
61779c913a198e315bfcdbea524529de
|
|
| BLAKE2b-256 |
1386370cf7d7c1962f9ac8663a0ad13b5a51f2f95521292af53ec7ca5b9209db
|