Skip to main content

remotedata

Accessing and caching remote data for python. May be used in the cases that:

  1. The remote data is being updated frequently
  2. You don't want to sync all the data but just per your request
  3. You want to cache the data locally for some time
  4. Especially, when the files are used for testing

Installation

pip install remotedata

Usage

Currently, data from github and dropbox are supported

Github

from remotedata import remotedata
rdata = remotedata(dict(
	source = 'github',
	cachedir = '/tmp/cached/',
	## if branch is not master: pwwang/remotedata/branch
	repos  = 'pwwang/remotedata',
	## optional, default is first part of repos
	# user = 'pwwang',
	## github token, in case you have > 60 requests per hours to github API
	# token = 'xxx',
))
readme = rdata.get('README.md')
# README.md is downloaded to /tmp/cache/github/pwwang.remotedata@master/README.md
# Now you can use it as a local file

# readme will be cached, we don't have to download it again,
# until it has been changed remotely.

# remove cached file
rdata.remove('README.md')
# clear up all caches
rdata.clear()

Dropbox

from remotedata import remotedata
rdata = remotedata(dict(
	source = 'dropbox',
	cachedir = '/tmp/cached/',
	dropbox_token = 'xxx'
))
rdata.get('/somefile') # or
rdata.get('somefile')

Metadata

Release files for remotedata 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remotedata 0.1.0
File Size Uploaded
remotedata-0.1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remotedata 0.1.0
File Interpreter ABI Platform
remotedata-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / remotedata-0.1.0.tar.gz

Download URL remotedata-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cbae0fb8483ae0330fda9938ea08dc9abfc79e833e2fc543565b58e295ab2de8
BLAKE2b-256 checksum
How to use checksums
81e52c8bf09b2794e23935d21be9c169e6347446ef3ee0a45c1b9ad848176ba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.1 Linux/4.15.0-1028-gcp

Release files / remotedata-0.1.0-py3-none-any.whl

Download URL remotedata-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb06895d3954df687e50ae5b47d7070f3de451fe2c2d0c1ecd532ab22a6c0fe9
BLAKE2b-256 checksum
How to use checksums
d332fb64fef1a6c27d9451555039dff2e870b269117510826b08fac8a08dee85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.1 Linux/4.15.0-1028-gcp

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page