sageintacctsdk


Namesageintacctsdk JSON
Version 1.19.1 PyPI version JSON
download
home_pagehttps://github.com/fylein/sageintacct-sdk-py
SummaryPython SDK for accessing Sage Intacct APIs
upload_time2024-04-15 06:49:55
maintainerNone
docs_urlNone
authorAshwin T
requires_pythonNone
licenseMIT
keywords sage-intacct sage fyle api python sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sage Intacct SDK
Python SDK to access Sage Intacct web services

## Installation

This project requires [Python 3+](https://www.python.org/downloads/) and [Requests](https://pypi.org/project/requests/) library (pip install requests).

1. Download this project and use it (copy it in your project, etc).
2. Install it from [pip](https://pypi.org).

        $ pip install sageintacctsdk

## Usage

To use this SDK you'll need these Sage Intacct credentials used for authentication: **sender ID**, **sender password**, **user ID**, **company ID** and **user password**.

This SDK is very easy to use.
1. First you'll need to create a connection using the main class SageIntacctSDK.
```python
from sageintacctsdk import SageIntacctSDK

connection = SageIntacctSDK(
    sender_id='<YOUR SENDER ID>',
    sender_password='<YOUR SENDER PASSWORD>',
    user_id='<YOUR USER ID>',
    company_id='<YOUR COMPANY ID>',
    user_password='<YOUR USER PASSWORD>'
)
```
2. After that you'll be able to access any of the 28 API classes: accounts, ap_payments, ar_invoices, ar_payments, attachments, bills, charge_card_accounts, charge_card_transactions, checking_accounts, classes, contacts, customers, departments, employees, expense_payment_types, expense_reports, expense_types, gl_detail, items, locations, order_entry_transactions, projects, reimbursements, revenue_recognition_schedules, revenue_recognition_schedule_entries, savings_accounts, tasks and vendors.
```python
"""
USAGE: <SageIntacctSDK INSTANCE>.<API_NAME>.<API_METHOD>(<PARAMETERS>)
"""

# Create a new Expense Report of 3800 USD, spent at 2019-28-11 and from employee with employee id E101
data = {
    'employeeid': 'E101',
    'datecreated': {
        'year': 2019,
        'month': 11,
        'day': 28
    },
    'state': 'Approved',
    'description': 'Team lunch',
    'expenses': {
        'expense': [
            {
                'expensetype': 'Food',
                'amount': 3800,
                'expensedate': {
                    'year': 2019,
                    'month': 11,
                    'day': 28
                }
            }
        ]
    }
}
response = connection.employees.post(data)

# Use get_all methods to get all objects of certain types
response = connection.accounts.get_all()

# Get details of Employee with EMPLOYEEID E101
response = connection.employees.get(field='EMPLOYEEID', value='E101')
```

## Advanced Queries
Several methods of querying the Sage Inacct API exists within the SDK.  <get_by_query> allows you to specify multiple
critera using textual mathematical operators and logical filters.

Arguments are passed to and_filter, or_filter, or both.  The and_filter is the default operator to pass filters to.
For example if you want to pass a single operator without a logical context you would pass it to and_filter.

You must pass multiple operators to or_filter.

You may also format your own filter payload in accordance with API documentation and pass to the function.

See query structures here: https://developer.intacct.com/web-services/queries/

Warning: Operators can only be used once in a given logical context. and_filter cannot accept multiple 'equalto' operators
for example.  This is an API limitation.

```python
#
# Returns Data Structure of object to perform query on.  Helpful to identify field keys.
print(connection.gl_detail.get_lookup())

# Returns records between specified dates
query_tuple_between = [('between','ENTRY_DATE',['01/01/2020','12/31/2020'])]
fields = ['RECORDNO','ENTRY_DATE','BATCH_NO','ACCOUNTNO','DEBITAMOUNT']
response = connection.gl_detail.get_by_query(fields=fields,and_filter=query_tuple_between)

# Returns records between specified accounts
query_tuple_multiple =[('greaterthan','ACOUNTNO','6000'),('lessthan','ACCOUNTNO','7000')]
response = connection.gl_detail.get_by_query(fields=fields,and_filter=query_tuple_multiple)

# Returns records that match list
in_list = ['1000','1100','1200']
query_tuple_in = [('in','ACCOUNTNO',in_list)]
response = connection.gl_detail.get_by_query(fields=fields,and_filter=query_tuple_in)

payload = {'and':{'equalto':{'field':'ACCOUNTNO','value':'1000'}}}
response = connnection.gl_detail.get_by_query(filter_payload=payload)

```

See more details about the usage into the wiki pages of this project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fylein/sageintacct-sdk-py",
    "name": "sageintacctsdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "sage-intacct, sage, fyle, api, python, sdk",
    "author": "Ashwin T",
    "author_email": "ashwin.t@fyle.in",
    "download_url": "https://files.pythonhosted.org/packages/0d/79/808747b052a291ad04db1a18a58f374d8589866580c62d5f3b1f76c72bcd/sageintacctsdk-1.19.1.tar.gz",
    "platform": null,
    "description": "# Sage Intacct SDK\nPython SDK to access Sage Intacct web services\n\n## Installation\n\nThis project requires [Python 3+](https://www.python.org/downloads/) and [Requests](https://pypi.org/project/requests/) library (pip install requests).\n\n1. Download this project and use it (copy it in your project, etc).\n2. Install it from [pip](https://pypi.org).\n\n        $ pip install sageintacctsdk\n\n## Usage\n\nTo use this SDK you'll need these Sage Intacct credentials used for authentication: **sender ID**, **sender password**, **user ID**, **company ID** and **user password**.\n\nThis SDK is very easy to use.\n1. First you'll need to create a connection using the main class SageIntacctSDK.\n```python\nfrom sageintacctsdk import SageIntacctSDK\n\nconnection = SageIntacctSDK(\n    sender_id='<YOUR SENDER ID>',\n    sender_password='<YOUR SENDER PASSWORD>',\n    user_id='<YOUR USER ID>',\n    company_id='<YOUR COMPANY ID>',\n    user_password='<YOUR USER PASSWORD>'\n)\n```\n2. After that you'll be able to access any of the 28 API classes: accounts, ap_payments, ar_invoices, ar_payments, attachments, bills, charge_card_accounts, charge_card_transactions, checking_accounts, classes, contacts, customers, departments, employees, expense_payment_types, expense_reports, expense_types, gl_detail, items, locations, order_entry_transactions, projects, reimbursements, revenue_recognition_schedules, revenue_recognition_schedule_entries, savings_accounts, tasks and vendors.\n```python\n\"\"\"\nUSAGE: <SageIntacctSDK INSTANCE>.<API_NAME>.<API_METHOD>(<PARAMETERS>)\n\"\"\"\n\n# Create a new Expense Report of 3800 USD, spent at 2019-28-11 and from employee with employee id E101\ndata = {\n    'employeeid': 'E101',\n    'datecreated': {\n        'year': 2019,\n        'month': 11,\n        'day': 28\n    },\n    'state': 'Approved',\n    'description': 'Team lunch',\n    'expenses': {\n        'expense': [\n            {\n                'expensetype': 'Food',\n                'amount': 3800,\n                'expensedate': {\n                    'year': 2019,\n                    'month': 11,\n                    'day': 28\n                }\n            }\n        ]\n    }\n}\nresponse = connection.employees.post(data)\n\n# Use get_all methods to get all objects of certain types\nresponse = connection.accounts.get_all()\n\n# Get details of Employee with EMPLOYEEID E101\nresponse = connection.employees.get(field='EMPLOYEEID', value='E101')\n```\n\n## Advanced Queries\nSeveral methods of querying the Sage Inacct API exists within the SDK.  <get_by_query> allows you to specify multiple\ncritera using textual mathematical operators and logical filters.\n\nArguments are passed to and_filter, or_filter, or both.  The and_filter is the default operator to pass filters to.\nFor example if you want to pass a single operator without a logical context you would pass it to and_filter.\n\nYou must pass multiple operators to or_filter.\n\nYou may also format your own filter payload in accordance with API documentation and pass to the function.\n\nSee query structures here: https://developer.intacct.com/web-services/queries/\n\nWarning: Operators can only be used once in a given logical context. and_filter cannot accept multiple 'equalto' operators\nfor example.  This is an API limitation.\n\n```python\n#\n# Returns Data Structure of object to perform query on.  Helpful to identify field keys.\nprint(connection.gl_detail.get_lookup())\n\n# Returns records between specified dates\nquery_tuple_between = [('between','ENTRY_DATE',['01/01/2020','12/31/2020'])]\nfields = ['RECORDNO','ENTRY_DATE','BATCH_NO','ACCOUNTNO','DEBITAMOUNT']\nresponse = connection.gl_detail.get_by_query(fields=fields,and_filter=query_tuple_between)\n\n# Returns records between specified accounts\nquery_tuple_multiple =[('greaterthan','ACOUNTNO','6000'),('lessthan','ACCOUNTNO','7000')]\nresponse = connection.gl_detail.get_by_query(fields=fields,and_filter=query_tuple_multiple)\n\n# Returns records that match list\nin_list = ['1000','1100','1200']\nquery_tuple_in = [('in','ACCOUNTNO',in_list)]\nresponse = connection.gl_detail.get_by_query(fields=fields,and_filter=query_tuple_in)\n\npayload = {'and':{'equalto':{'field':'ACCOUNTNO','value':'1000'}}}\nresponse = connnection.gl_detail.get_by_query(filter_payload=payload)\n\n```\n\nSee more details about the usage into the wiki pages of this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python SDK for accessing Sage Intacct APIs",
    "version": "1.19.1",
    "project_urls": {
        "Homepage": "https://github.com/fylein/sageintacct-sdk-py"
    },
    "split_keywords": [
        "sage-intacct",
        " sage",
        " fyle",
        " api",
        " python",
        " sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "daf9b2633baadd96d035eb85cc5b808e0b26e2abaf18e5fb28d71f7f09ad55bb",
                "md5": "88e91032618c40bb0f6bb38475e34fb0",
                "sha256": "ed6c465c4eb38107da9c0d86f744a86a282d7593a3415739cbc8f79efd62f9be"
            },
            "downloads": -1,
            "filename": "sageintacctsdk-1.19.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88e91032618c40bb0f6bb38475e34fb0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 29392,
            "upload_time": "2024-04-15T06:49:54",
            "upload_time_iso_8601": "2024-04-15T06:49:54.203337Z",
            "url": "https://files.pythonhosted.org/packages/da/f9/b2633baadd96d035eb85cc5b808e0b26e2abaf18e5fb28d71f7f09ad55bb/sageintacctsdk-1.19.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d79808747b052a291ad04db1a18a58f374d8589866580c62d5f3b1f76c72bcd",
                "md5": "86b68ece3e109fba44383a8d1a433b16",
                "sha256": "97e7cfb83ffff6a0e8cf6ac92b39c2064b262a76a9fc2a58c4511bc340e15c82"
            },
            "downloads": -1,
            "filename": "sageintacctsdk-1.19.1.tar.gz",
            "has_sig": false,
            "md5_digest": "86b68ece3e109fba44383a8d1a433b16",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19306,
            "upload_time": "2024-04-15T06:49:55",
            "upload_time_iso_8601": "2024-04-15T06:49:55.538797Z",
            "url": "https://files.pythonhosted.org/packages/0d/79/808747b052a291ad04db1a18a58f374d8589866580c62d5f3b1f76c72bcd/sageintacctsdk-1.19.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-15 06:49:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fylein",
    "github_project": "sageintacct-sdk-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "sageintacctsdk"
}
        
Elapsed time: 0.23086s