README
This tool provides one-way idempotent sync from python dicts. Uses airtable-python-wrapper for access to airtable REST API.
Installing
pip install atsync
Documentation
Just this README so far
Usage example
This library is small and simple and only does one thing: upsert dicts into airtable.
# Define each related table in a list of dicts
related_tables = [
{
'table_name': 'Contact Details',
'primary_key': 'Email Address', # primary key of this related table
'related_on': 'Email', # key in our target table that is related to this table
},
]
# Define your target table with an atsync Table instance
sync_table = atsync.Table(table_name='User Table',
primary_key='User ID', # primary key as seen in the airtable user interface
'base_key': 'appZZZZZZZZZZZZZZ', # Can be found in the url of your api doco (see below)*
'api_key': 'keyABCDEFG', # Can be found in the api doco (see below)*
related_tables=related_tables)
# Assumes all the fields in users.csv are also in airtable
with open('users.csv', 'r') as user_file:
import csv
users = csv.DictReader(user_file)
for user in users:
sync_table.update_record(user) # updates existing reocrd with same primary key, otherwise inserts a new record
* To find your base_key and api_key, open Airtable, click the help link on the top right, choose "API Documentation".
- Your
base_keywill be the first section of url after the domain: airtable.com/>>this bit<</api/docs#... - Your
api_keycan be found by clicking the "show API key" checkbox at the top right of the page
License
Metadata
Release files for atsync 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atsync-1.0.1.tar.gz | 3.2 kB | Without provenance | Details for atsync-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atsync-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for atsync-1.0.1-py2.py3-none-any.whl |
Total release size: 6.4 kB
Release files / atsync-1.0.1.tar.gz
| Download URL | atsync-1.0.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
894ada8b1b4f35c56a48ec23933781664a129e747eea575f4e5731b2c9756229
|
|
BLAKE2b-256 checksum How to use checksums |
f7f0616bd57674f1bbb17ea4bae923c0cc8439994cb713f092e0e2e2336294ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / atsync-1.0.1-py2.py3-none-any.whl
| Download URL | atsync-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
49b031a570bdea07eb187b8d4a5215c1f9cd2866e73c53b18ea62d990b6a5361
|
|
BLAKE2b-256 checksum How to use checksums |
5afdcedb77e7826d689031dc8bb13e2bbe99521a9d4410e70121fb2302ca56e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for atsync 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.