单向同步python dicts到airtable。

atsync的Python项目详细描述


自述文件

此工具提供来自python dicts的单向等幂同步。使用airtable python包装器访问airtable rest api。

安装

pip install atsync

文档

目前仅此自述文件

使用示例

这个库小而简单,只做一件事:将dicts插入airtable。

# Define each related table in a list of dictsrelated_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 instancesync_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 airtablewithopen('users.csv','r')asuser_file:importcsvusers=csv.DictReader(user_file)foruserinusers:sync_table.update_record(user)# updates existing reocrd with same primary key, otherwise inserts a new record

*要查找base_keyapi_key,请打开airtable,单击右上角的“帮助”链接,选择“api文档”。

  • 您的base_key将是url的第一个部分,位于域之后:airtable.com/>;这个位<;/api/docs\
  • 您的api_key可以通过单击页面右上角的“show api key”复选框找到

许可证

MIT

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何转换apache。cfx。OmeElement的头对象   java无法从SpringSource工具套件2.8.1热部署到GlassFish 3.1   从聊天中删除用户的阵列(Java)   JAVA木卫一。在安卓中解压缩时发生FileNotFoundException   java如何在活动和其他Activity创建的线程之间进行通信   java使用TimeUnit在更改JavaFX标签文本之间休眠   使用hibernate在MySql数据库表中实现java行级锁定   nextLine()扫描仪java无法正常工作(可能是因为Unicode)   java HSQLDB 2.4如何使用UNIX_MILLIS()作为BIGINT列的默认值   java如何为媒体卷更改注册ContentObserver?   JAVA木卫一。IOException:在salesforce上插入数据时,不活动的原因是必需的   java跨越了可观察对象发出的值   java在使用try and catch时播放声音