accelapy


Nameaccelapy JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/michaelachrisco/accelapy
SummaryAccela REST API
upload_time2024-12-30 17:26:26
maintainerNone
docs_urlNone
authorMichaelAChrisco
requires_python<4.0,>=3.10
licenseAGPL-3.0-or-later
keywords accela rest api
VCS
bugtrack_url
requirements httpx attrs requests python-dateutil
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # accelapy
An Accela specific API for https://developer.accela.com/docs/api_reference/api-index.html

## How to use:
`pip install accelapy`

You may need to get your payload from Accela for your environment.

```python
from accelapy.client import AccelaClient
from accelapy.records_client.types import Response
from accelapy.records_client.models import RecordModel, TableModel
import json
from typing import List
from accelapy.payload import Payload

payload = Payload(payload_str='totally-real-payload')
api_client = AccelaClient(payload=payload)

# Get an Accela record, then get its associated custom tables
record_response: Response = api_client.v4_get_records.sync_detailed(client=api_client.authentication_client,
                                                                    custom_id='TM-6308')
json_load = json.loads(record_response.content)
record_models: List[RecordModel] = [RecordModel.from_dict(x) for x in json_load['result']]
print(record_models)

real_record_id = record_models[0].id
record_custom_tables_response: Response = api_client.v_4_get_records_record_id_custom_tables.sync_detailed(
    client=api_client.authentication_client, record_id=real_record_id)
json_load = json.loads(record_custom_tables_response.content)

custom_tables: List[TableModel] = [TableModel.from_dict(x) for x in json_load['result']]
print(custom_tables)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/michaelachrisco/accelapy",
    "name": "accelapy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "accela, rest, api",
    "author": "MichaelAChrisco",
    "author_email": "michaelachrisco@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3c/5d/c389e1223960f956040a326ba2e14cbe383a64d0dced3b0424242248ec39/accelapy-0.3.2.tar.gz",
    "platform": null,
    "description": "# accelapy\nAn Accela specific API for https://developer.accela.com/docs/api_reference/api-index.html\n\n## How to use:\n`pip install accelapy`\n\nYou may need to get your payload from Accela for your environment.\n\n```python\nfrom accelapy.client import AccelaClient\nfrom accelapy.records_client.types import Response\nfrom accelapy.records_client.models import RecordModel, TableModel\nimport json\nfrom typing import List\nfrom accelapy.payload import Payload\n\npayload = Payload(payload_str='totally-real-payload')\napi_client = AccelaClient(payload=payload)\n\n# Get an Accela record, then get its associated custom tables\nrecord_response: Response = api_client.v4_get_records.sync_detailed(client=api_client.authentication_client,\n                                                                    custom_id='TM-6308')\njson_load = json.loads(record_response.content)\nrecord_models: List[RecordModel] = [RecordModel.from_dict(x) for x in json_load['result']]\nprint(record_models)\n\nreal_record_id = record_models[0].id\nrecord_custom_tables_response: Response = api_client.v_4_get_records_record_id_custom_tables.sync_detailed(\n    client=api_client.authentication_client, record_id=real_record_id)\njson_load = json.loads(record_custom_tables_response.content)\n\ncustom_tables: List[TableModel] = [TableModel.from_dict(x) for x in json_load['result']]\nprint(custom_tables)\n```\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-or-later",
    "summary": "Accela REST API",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/michaelachrisco/accelapy",
        "Repository": "https://github.com/michaelachrisco/accelapy"
    },
    "split_keywords": [
        "accela",
        " rest",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "552c66376cefbe337c15635e278a23f69764ce3653ce16c9287a33563bf363fe",
                "md5": "9ccc635fe4b64b39d96c4575072b7af6",
                "sha256": "49f340a903f89f1c9f4f01934c55f17c4521a1e340f734cf7113e8be8752e18a"
            },
            "downloads": -1,
            "filename": "accelapy-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9ccc635fe4b64b39d96c4575072b7af6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 695897,
            "upload_time": "2024-12-30T17:26:22",
            "upload_time_iso_8601": "2024-12-30T17:26:22.464195Z",
            "url": "https://files.pythonhosted.org/packages/55/2c/66376cefbe337c15635e278a23f69764ce3653ce16c9287a33563bf363fe/accelapy-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c5dc389e1223960f956040a326ba2e14cbe383a64d0dced3b0424242248ec39",
                "md5": "6405d96010a0dadefae1f784523572ee",
                "sha256": "5668dc99f23106b7f02f472ded11564f3c53a701e8d2c0a4bea092d4558290b1"
            },
            "downloads": -1,
            "filename": "accelapy-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6405d96010a0dadefae1f784523572ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 227559,
            "upload_time": "2024-12-30T17:26:26",
            "upload_time_iso_8601": "2024-12-30T17:26:26.536192Z",
            "url": "https://files.pythonhosted.org/packages/3c/5d/c389e1223960f956040a326ba2e14cbe383a64d0dced3b0424242248ec39/accelapy-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-30 17:26:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "michaelachrisco",
    "github_project": "accelapy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "httpx",
            "specs": []
        },
        {
            "name": "attrs",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "python-dateutil",
            "specs": []
        }
    ],
    "lcname": "accelapy"
}
        
Elapsed time: 1.50565s