This repository was archived by the owner on Jan 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Running the Library Through the a Python File
Kelvin edited this page Nov 2, 2020
·
5 revisions
1. Create a new Python script (by using notepad or any other text editor) and initialize a First Street Foundation API Client.
[Reminder] Keep your API key safe, and do not share it with others!
[NOTE] This method will NOT generate a CSV by default. An argument must be passed to generate a CSV.
# Contents of my_script.py
import firststreet
fs = firststreet.FirstStreet("api-key")firststreet.FirstStreet(api_key, [connection_limit], [rate_limit], [rate_period], [version], [log])- api_key
string: The assigned API key to access the API. - connection_limit
int=100: The max number of connections to make - rate_limit
int=20000: The max number of requests during the period - rate_period
int=1: The period of time for the limit - version
string= v1: The version of the API to access. Defaults to the current version. - log
bool= True: Setting for whether to log info or not. Defaults to True.
NOTE: If you are using Jupyter Notebook, add the following to the top of the file before the client initialization above to allow the jupyter notebook and download loops to work correctly
# Setup For Notebook only
import nest_asyncio
nest_asyncio.apply()
firststreet.FirstStreet(api_key, [connection_limit], [rate_limit], [rate_period], [version], [log])2. Call one of the methods described below in the Products section with the required arguments. See the Examples section in each product page for more examples.
fs.<product>.<product_subtype>(<search_items: list>, <lookup_type: string>, <csv: boolean>)
OR



-
Installation
-
Usage
-
Products
-
Update