fyle-archive-utility
Command-line tool to download Fyle data.
Installation
This project requires python 3.7+ , fylesdk and click library
-
You can download this project and use it ( copy in your own project, etc)
-
Install it from pip
$ pip install fyle-archive-utility
Usage
To use this archive utility you'll need these Fyle credentials : client ID, client secret and refresh token.
$ python -m fyle_archive_utility connect
# Then will ask for Fyle credentials
Please enter the credentials:
client_id: <type> press enter
client_secret: <type> press enter
refresh_token: <type> press enter
base_url: <type> press enter
Once you are connected your credentials will be saved and you can access your data
Now you are able to access the command line interface for downloading Fyle data
$ python -m fyle_archive_utility expenses --file_format=csv --path='/Users/sravankumar/Desktop' // Lists out all the expenses of your org that match the parameters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --file_format=json --path='/Users/sravankumar/Desktop' // Lists out all the expenses of your org that match the parameters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='COMPLETE' --file_format=csv --path='/Users/sravankumar/Desktop' // Lists out all the expenses of your org that match the parameters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=json --path='/Users/sravankumar/Desktop' // Lists out all the expenses of your org that match the parameters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --approved_at_gte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=json --path='/Users/sravankumar/Desktop' --approved_at_gte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --approved_at_lte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=json --path='/Users/sravankumar/Desktop' --approved_at_lte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --approved_at_gte='2019-11-01T00:00:00.000Z' --approved_at_lte='2019-11-30T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=json --path='/Users/sravankumar/Desktop' --approved_at_gte='2019-11-01T00:00:00.000Z' --approved_at_lte='2019-11-30T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --approved_at_gte='2019-11-01T00:00:00.000Z' --download_attachments='True' // Lists out all the expenses of your org that match the parameters with date filters along with attachments and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --approved_at_gte='2019-11-01T00:00:00.000Z' --approved_at_lte='2019-11-30T00:00:00.000Z' --download_attachments='True' // Lists out all the expenses of your org that match the parameters with date filters along with attachments and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='FYLED' --file_format=csv --path='/Users/sravankumar/Desktop' --updated_at_gte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='FYLED' --file_format=json --path='/Users/sravankumar/Desktop' --updated_at_gte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='FYLED' --file_format=csv --path='/Users/sravankumar/Desktop' --updated_at_lte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='FYLED' --file_format=json --path='/Users/sravankumar/Desktop' --updated_at_lte='2019-11-01T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --updated_at_gte='2019-11-01T00:00:00.000Z' --updated_at_lte='2019-11-30T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=json --path='/Users/sravankumar/Desktop' --updated_at_gte='2019-11-01T00:00:00.000Z' --updated_at_lte='2019-11-30T00:00:00.000Z' // Lists out all the expenses of your org that match the parameters with date filters and saves it as a json file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --updated_at_gte='2019-11-01T00:00:00.000Z' --download_attachments='True' // Lists out all the expenses of your org that match the parameters with date filters along with attachments and saves it as a csv file in the given path
$ python -m fyle_archive_utility expenses --state='APPROVED' --file_format=csv --path='/Users/sravankumar/Desktop' --updated_at_gte='2019-11-01T00:00:00.000Z' --updated_at_lte='2019-11-30T00:00:00.000Z' --download_attachments='True' // Lists out all the expenses of your org that match the parameters with date filters along with attachments and saves it as a json file in the given path
Contribute
To contribute to this project follow the steps
- Fork and clone the repository.
- Run
pip install -r requirements.txt - Setup pylint precommit hook
- Create a file
.git/hooks/pre-commit - Copy and paste the following lines in the file -
#!/usr/bin/env bash git-pylint-commit-hook - Run
chmod +x .git/hooks/pre-commit
- Create a file
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for fyle-archive-utility 0.2.1
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 |
|---|---|---|---|---|
| fyle-archive-utility-0.2.1.tar.gz | 5.4 kB | Without provenance | Details for fyle-archive-utility-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fyle_archive_utility-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for fyle_archive_utility-0.2.1-py3-none-any.whl |
Total release size: 12.8 kB
Release files / fyle-archive-utility-0.2.1.tar.gz
| Download URL | fyle-archive-utility-0.2.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fa816c98ac44b017863daaf786c431c885bbc3ebb271d336d56bff36f2e0b89
|
|
BLAKE2b-256 checksum How to use checksums |
a1d7348427639b008c214e695fe84dd78dfdda1bed05c1213ff0dbae33491de3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / fyle_archive_utility-0.2.1-py3-none-any.whl
| Download URL | fyle_archive_utility-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d1f83efe36ff9c7a329eeb6dcb7a0b7101baa23919aefe2ce614ac616a8af9f
|
|
BLAKE2b-256 checksum How to use checksums |
1b496db0943b83f9701a497aecffce823f6b32a7e3410d977f5eb0323807390a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for fyle-archive-utility 0.2.1
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.