A python package that allows software to connect to the Philippine Jesuit Foundation's Donations Dropbox through various data stores like the dropbox cloud, file system, and a custom database.
Project description
pjf_donation_dropbox_api
A python package that allows software to connect to the Philippine Jesuit Foundation's Donations Dropbox through various data stores like the dropbox cloud, file system, and a custom database.
Installation
$ pip install pjf_donation_dropbox_api
Usage
pjf_donation_dropbox_api can be used to connect to the dropbox account and cache it as a sqlite database in a local mount as follows:
DROPBOX_ACCESS_TOKEN = os.getenv("DROPBOX_ACCESS_TOKEN")
dropbox_fs = pjf_donation_dropbox_api.DropboxCloudFileSystem(DROPBOX_ACCESS_TOKEN)
# We create a CachedFilesDatabase object from this package that will reference and read the dropbox object.
db = pjf_donation_dropbox_api.CachedFilesDatabase(dropbox_fs_reference=dropbox_fs, autosave=False)
sqlite_db_to_store_dropbox = "/path/to/db.sqlite" # you could also store in sqlite memory.
# The database object copies the entire dropbox starting from the root. It then places each file and excel file as a database record in the table. Knowing the schema of the underlying db is not required for the API user. You can still access the cached files through methods like .read() below.
db.save_entire_state(destination_path=sqlite_db_to_store_dropbox)
# Read back the file to verify
file = db.read("/test_data_folder/test_file.txt")
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
pjf_donation_dropbox_api was created by Kenneth Salanga. It is licensed under the terms of the Proprietary license.
Credits
pjf_donation_dropbox_api was created with cookiecutter and the py-pkgs-cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pjf_donation_dropbox_api-0.1.0.tar.gz.
File metadata
- Download URL: pjf_donation_dropbox_api-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.2 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
777b7fc7f0864a404396175a52393375180664aec5c5d3ed835f73b06fd2ee2c
|
|
| MD5 |
46d0806b62aca0dfd7d81b09e5efaede
|
|
| BLAKE2b-256 |
f470ea06d58c94c28c3a8fa919285b74ec78ccdba1c11d0489988e6c9e424a83
|
File details
Details for the file pjf_donation_dropbox_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pjf_donation_dropbox_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.2 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3622b4331a898ff995ce2e11f07fb0ad90ac1f7141b17f274be6140ec3f9658
|
|
| MD5 |
0dc0668651343c882aca7ac481a9087b
|
|
| BLAKE2b-256 |
730fa46a98b91198b84158c6ea15bcc283f3640aeffd41c48efde220c9858a8a
|