Skip to main content

Utility for caching api responses from the airtable-python-wrapper based on airtable-caching by rmountjoy

Project description

Airtable Cacher

This plugin is fork of the work done by Ron Mountjoy on Airtable Caching https://github.com/rmountjoy92/AirtableCaching

Caching

First you must setup a recurring script that will cache the table.

from airtable_cacher import Base

airtable = Base(<AIRTABLE_BASE_ID>, <AIRTABLE_API_KEY>)

"""
Main Function
"""

airtable.cache_table(<AIRTABLE_PRODUCTS_TABLE>)

You can optionally supply a third argument to Base() for setting the json folder like so:

from airtable_cacher import Base

airtable = Base(<AIRTABLE_BASE_ID>, <AIRTABLE_API_KEY>, "my_json_folder")

Caching images

If you'd like to cache images, you can do so by supplying an optional fourth argument

Accessing cached data

from airtable_cacher import Table

products_table = Table(<AIRTABLE_BASE_ID>,<AIRTABLE_PRODUCTS_TABLE>)

If you have supplied a custom JSON folder path in the caching, you supply that as an optional third argument in Table()

from airtable_cacher import Table

products_table = Table(<AIRTABLE_BASE_ID>,<AIRTABLE_PRODUCTS_TABLE>, "my_json_folder")

To get all records then use

records = products_table.all()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airtable-cacher-1.2.5.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

airtable_cacher-1.2.5-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file airtable-cacher-1.2.5.tar.gz.

File metadata

  • Download URL: airtable-cacher-1.2.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for airtable-cacher-1.2.5.tar.gz
Algorithm Hash digest
SHA256 3c9c72969e0fbfafeda38d2be35b87543a9b310d26b46bbc58936d440034125a
MD5 03cc336127bb4d1c7ddb11a1f6583d64
BLAKE2b-256 6db00aa0d179378c08519e17cb493200b86f0e5ce85a63a3ccd50709d8051a56

See more details on using hashes here.

File details

Details for the file airtable_cacher-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: airtable_cacher-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for airtable_cacher-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ded73f8bfd046021dc48ec520cec69c1ec84ac53c3d3cb34216220ebbf800400
MD5 44383ac96798ea759a14bc1ef4d18c13
BLAKE2b-256 605b01892d8a7a31ceb57261db5720e64d51a343a38da0635391783708017e6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page