Public airtable web scraper tool
Project description
Airtable Scraper
A package used to scrape any public airtable.
Table of Contents
Install
pip install airtable_scraper
Usage
After install, you can use this code for testing (replace url with your own airtable shared view url).
from airtable_scraper import AirtableScraper
url = "https://airtable.com/app7rljHYfQ4tfGrq/shrJ2psoFssctoP5o"
table = AirtableScraper(url=url)
# check status code (ex. 200 = success)
print(table.status)
Table Data
print(table.data)
Save Airtable As ...
CSV
- String: If no filepath is provided, returns a csv formatted string.
csv_str = table.to_csv()
- CSV File: If a filepath is provide, save as a csv file. (Change "my_table.csv" to your own filename)
table.to_csv("my_table.csv")
JSON
- String: If no filepath is provided, returns a json formatted string.
json_str = table.to_json()
- JSON File: If a filepath is provide, save as a json file. (Change "my_table.json" to your own filename)
table.to_json("my_table.json")
Python Dictionary
Converts data into python dictionary format.
orient
: Useorient
parameter to change the type of values of the dictionary.- "records": list like [{column -> value}, … , {column -> value}]
- "index": dict like {index -> {column -> value}}
data_d = table.to_dict()
Pandas DataFrame
Save data to Pandas DataFrame.
df = table.to_dataframe()
Metadata
You can use these helper methods to checkout additional Airtable metadata or http request parameters.
Airtable Information
print a summary of the airtable, including the airtable column type and python datatype.
table.info()
Additional Airtable shared view information
print(table.view_id)
print(table.table_id)
print(table.app_id)
print(table.share_id)
HTTP Request Parameters & Responses
print(table.headers)
print(table.request_id)
print(table.raw_rows_json)
print(table.raw_columns_json)
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
airtable_scraper-0.0.3.tar.gz
(14.3 kB
view details)
Built Distribution
File details
Details for the file airtable_scraper-0.0.3.tar.gz
.
File metadata
- Download URL: airtable_scraper-0.0.3.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152dd3449a1ece47ea3bee355fc88093a937f6af7153a6d44479d35eb41b6708 |
|
MD5 | 056868e7b45d48f676c4074a96f8441f |
|
BLAKE2b-256 | ebd3137eff50b3545c1a7a2cb345480efe6e64ec4946a86dc99d324972941194 |
File details
Details for the file airtable_scraper-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: airtable_scraper-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1a2bdbb8d398e11abaee47ae20a672abf57ff0f8808f526774d7ca45352e7b |
|
MD5 | 0c3bdcd3518ad6764722f4fcc7f9727d |
|
BLAKE2b-256 | 00fc68040b25b203134f3028a02b34d33b6f5e606e465cecc64f808daaac2709 |