ALTADATA Python Library¶
ALTADATA Python library provides convenient access to the ALTADATA API from applications written in the Python language.
altadata module¶
Python library for the ALTADATA API
This Python library allows a developer to build applications around the ALTADATA API without having to deal with accessing and managing the requests and responses.
-
class
altadata.
AltaDataAPI
(api_key, dataframe_functionality=False)[source]¶ Bases:
object
This is the main class of the API module. It contains all of the data API logic.
-
condition_in
(condition_column=None, condition_value=None)[source]¶ ‘In’ condition by given column and value list
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-
condition_not_in
(condition_column=None, condition_value=None)[source]¶ ‘Not in’ condition by given column and value list
- Parameters
condition_column (
Optional
[str
]) – column to which the condition will be appliedcondition_value – value to use with condition
-
equal
(condition_column=None, condition_value=None)[source]¶ ‘Equal’ condition by given column and value in the retrieve data process
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-
get_data
(product_code, limit=None)[source]¶ Initialize retrieve data process
- Parameters
product_code (
str
) – Data product codelimit (
Optional
[int
]) – Number of rows you want to retrieve
-
get_header
(product_code)[source]¶ Get data header as a list
- Parameters
product_code (
str
) – Data product code- Return type
list
-
greater_than
(condition_column=None, condition_value=None)[source]¶ ‘Greater than’ condition by given column and value
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-
greater_than_equal
(condition_column=None, condition_value=None)[source]¶ ‘Greater than equal’ condition by given column and value
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-
less_than
(condition_column=None, condition_value=None)[source]¶ ‘Less than’ condition by given column and value
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-
less_than_equal
(condition_column=None, condition_value=None)[source]¶ ‘Less than equal’ condition by given column and value
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-
list_subscription
()[source]¶ List customer’s subscriptions
- Returns
if dataframe_functionality parameter is False returns list of dict otherwise returns pandas dataframe.
-
load
()[source]¶ Fetch data with configurations given before
- Returns
if dataframe_functionality parameter is True returns pandas dataframe otherwise returns list of dict.
-
not_equal
(condition_column=None, condition_value=None)[source]¶ ‘Not equal’ condition by given column and value
- Parameters
condition_column (
Optional
[str
]) – Column to which the condition will be appliedcondition_value – Value to use with condition
-