remotedata
Accessing and caching remote data for python. May be used in the cases that:
- The remote data is being updated frequently
- You don't want to sync all the data but just per your request
- You want to cache the data locally for some time
- 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| remotedata-0.1.0.tar.gz | 5.3 kB | Without provenance | Details for remotedata-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| remotedata-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for remotedata-0.1.0-py3-none-any.whl |
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
|
Security for remotedata 0.1.0
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.