A simple multiprocessing google drive api
Project description
A simple package
import fesenjoon
drive = fesenjoon.Drive()
# NOTE: URI params must be strings not integers
gist_uri = 'https://api.github.com/gists{/gist_id}'
t = URITemplate(gist_uri)
print(t.expand(gist_id='123456'))
# => https://api.github.com/users/sigmavirus24/gists/123456
# or
print(expand(gist_uri, gist_id='123456'))
# also
t.expand({'gist_id': '123456'})
print(expand(gist_uri, {'gist_id': '123456'}))
Where it might be useful to have a class
from fesenjoon import Drive
drive = Drive()
When the module containing this class is loaded, GitHubUser.url is evaluated and so the template is created once. It’s often hard to notice in Python, but object creation can consume a great deal of time and so can the re module which uritemplate relies on. Constructing the object once should reduce the amount of time your code takes to run.
Installing
pip install fesenjoon
License
GPL license
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
fesenjoon-0.0.5.tar.gz
(18.6 kB
view details)
Built Distribution
fesenjoon-0.0.5-py3-none-any.whl
(19.0 kB
view details)
File details
Details for the file fesenjoon-0.0.5.tar.gz
.
File metadata
- Download URL: fesenjoon-0.0.5.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87214f58ee3067a758cfa14c455bf11cc0759f559fda6e0a3d41c65a37662bab |
|
MD5 | cc8fffceaa006aaeeb0ab3f445ead081 |
|
BLAKE2b-256 | b3a412dbd0ff615522205b6fb787402c23c2b01fdd772a28b973dd5281a18dd1 |
File details
Details for the file fesenjoon-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: fesenjoon-0.0.5-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8dc366c19c218116dd5c05facfc3ed988592fdad2a89468ca911785fa996192 |
|
MD5 | c9637bc7c5e9bb35195d4c6ade3656fe |
|
BLAKE2b-256 | bacf15fb47a161190c6903fd86a5a10fdab32acfeb4690df5004c29e4dce367a |