Skip to main content

Connects Fyle to a database connector to transfer information to and fro.

Project description

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

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

fyle-db-connector-0.12.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fyle_db_connector-0.12.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file fyle-db-connector-0.12.0.tar.gz.

File metadata

  • Download URL: fyle-db-connector-0.12.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for fyle-db-connector-0.12.0.tar.gz
Algorithm Hash digest
SHA256 640300bdd20b0399044e6b465ea96944eaa7f144c4cb2ddfbb6330a46f93e9c7
MD5 6cfd951993be47fedadd06e2726c14be
BLAKE2b-256 7abc285d3e2b38e5d6e0a94bbe299240f3f783fd5828eeb0fa9ec68843a343d9

See more details on using hashes here.

File details

Details for the file fyle_db_connector-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: fyle_db_connector-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for fyle_db_connector-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc2776af6c688f9b433fd6caedaaf7fd0d967fa50449d304acd6fc56633a3a59
MD5 b0d46c43a5bc1adbf4788f085f023beb
BLAKE2b-256 b1164086ab647e61dcca32177ac3efbd8dfd21d4f6a873ae1dd22cd48c276b51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page