单向同步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使用CSPRNG中的序列种子PRNG安全吗?   java如何使JTable列大小与内容精确(或紧密)匹配?   java Android textview具有两种不同大小的文本   java在任意事物的列表(数组)中创建关联的最佳方法是什么?   java保存可扩展字符串?   java成员类(内部类)如何访问外部类的实例变量?   java使用Android 6.0(API级别23)使用rest的最佳方式是什么   java为什么我会收到“学习记录”。Student@25a43blb'尝试显示链接列表中的所有对象时?   java如何将SVG文本转换为SVG路径?   java Paypal返回URL参数支付状态   java Libgdx:导出到可运行Jar   java JPA获取连接实体的最小/最大属性   附加到类型变量的java编号?   java Object[]到底是什么?   java如何在安卓中的片段和活动之间共享数据   java使用MinGW为windows构建linux库   java将变量值传递给eval函数   java仅在转换完成时使方法返回   Java二维数组对角线