Skip to main content

Fyle Database Connector

Connects Fyle to a database to transfer information to and fro. Fyle is an expense management system.

Installation

This project requires Python 3+.

  1. Download this project and use it (copy it in your project, etc).

  2. Install it from pip.

     $ pip install fyle-db-connector
    

Usage

To use this connector you'll need these Fyle credentials used for OAuth2 authentication: client ID, client secret and refresh token.

This connector is very easy to use.

  1. First you'll need to create a connection using the main class FyleSDK.
import sqlite3

from fylesdk import FyleSDK
from fyle_db_connector import FyleExtractConnector


dbconn = sqlite3.connect('/tmp/temp.db')

connection = FyleSDK(
    base_url='<BASE_URL>',
    client_id="<CLIENT_ID>",
    client_secret='<CLIENT_SECRET>',
    refresh_token='<REFRESH_TOKEN>'
)

fyle_extract = FyleExtractConnector(
    fyle_sdk_connection=connection,
    dbconn=dbconn
)
  1. After that you'll be able to extract data from fyle and store it in the db
# Create the tables to for all objects
fyle_extract.create_tables()

fyle_extract.extract_expenses(state=['PAYMENT_PROCESSING'])
fyle_extract.extract_settlements()
fyle_extract.extract_employees()
fyle_extract.extract_reimbursements()
fyle_extract.extract_advances()
fyle_extract.extract_advance_requests(state=['PAID'])
fyle_extract.extract_projects()
fyle_extract.extract_cost_centers()
fyle_extract.extract_categories()

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

License

This project is licensed under the MIT License - see the LICENSE file for details

Metadata

Release files for fyle-db-connector 0.14.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 fyle-db-connector 0.14.0
File Size Uploaded
fyle-db-connector-0.14.0.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fyle-db-connector 0.14.0
File Interpreter ABI Platform
fyle_db_connector-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.6 kB

Release files / fyle-db-connector-0.14.0.tar.gz

Download URL fyle-db-connector-0.14.0.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a77349353d7ab6dee732ac2c35cc0175913dcc992fc785c32c789d582ef05410
BLAKE2b-256 checksum
How to use checksums
c90cd6ad0a588d4a02915512bb55e9c1953e83bb6dbab168e25e19b017a59d12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release files / fyle_db_connector-0.14.0-py3-none-any.whl

Download URL fyle_db_connector-0.14.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f996f20b6850b1e4e7d93db57c20776725b46a756c1af4e50b7d986e40290f2
BLAKE2b-256 checksum
How to use checksums
da84730c023be604bf3af8d592454bc3bdb4e1856592e8a9e492bb0f8afea1d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.14.0 This release

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

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