ardoqpy


Nameardoqpy JSON
Version 0.8.4 PyPI version JSON
download
home_pagehttps://github.com/jbaragry/ardoq-python-client
SummaryA python REST API wrapper for Ardoq - https://ardoq.com.
upload_time2024-01-27 14:46:18
maintainer
docs_urlNone
authorJason Baragry
requires_python
licenseMIT
keywords architecture ardoq rest api wrapper tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ardoqpy - a Python client for The Ardoq REST API

## Description

Ardoqpy is a thin client library for the [Ardoq](https://ardoq.com) REST API.
It consists of 3 clients
- ArdoqClient
    - thin client for the rest-api
- ArdoqSyncClient
    - subclass of ArdoqClient
    - maintains a cache of aggregated workspace information
    - overrides write operations
        - only create components and references if they are not already in the cache
        - update cache for create and update operations
        - cache hit is based on
            - component: name, typeId
                - NB: name match is CASE_INSENSITIVE
            - reference: source, target, and type
    - overriders find_component (comp_name)
        - loads aggregated workspace to cache if its not present
        - finds component based on either of the following 
            - name: substring or exact match
            - fieldname == fieldvalue (you need to ensure the types can handle equivalence)
                - fieldname, if not None, is checked first
    - can be run in simulate mode which updates the report but does not execute write operations in ardoq
- Ardoq V2 Client
  - this is a copy of the client provided by ardoq in their developer portal
  - v2 api functionality can be used from this client or built into the original ArdoqClient

## Documentation
(see the test client for examples)

### ArdoqClient Import Usage
```
from ardoqpy import ArdoqClient
```

ArdoqClient Implemented:
- workspace
    - get all
        - summary=True is undocumented in the REST docs but returns stats for workspaces
    - get by ID
    - get by ID aggregated
    - create workspace
    - delete
    - create folder
    - move workspace to folder
- component
    - get by ID
    - get all for workspace
    - create
    - delete
    - update
    - find by name in workspace
    - find by field_name / field_value in workspace
- reference
    - get all for workspace
    - get by ID
    - create
    - update
    - delete
- tag
    - get by ID
    - get all for workspace
    - create
    - update
    - delete
- model
    - get by ID
    - get all models and templates
    - print model to get IDs for component and reference types
    - find reference_type by name
    - find component_type by name
- folder
  - create
  - get by ID and all folders
- util
    - pprint
        - pretty print responses from ardoq calls

### ArdoqSyncClient Import Usage
```
from ardoqpy_sync import ArdoqSyncClient
ardoq = ArdoqSyncClient(hosturl=host, token=token)
ardoqsim = ArdoqSyncClient(hosturl=host, token=token, simulate=True)
```

ArdoqSyncClient Implemented:
- all interfaces from ArdoqClient
- component
    - create
        - cache check is based on name attribute only (case insensitive)
    - update
- reference
    - create
        - cache check is based on source, target, and type attributes
    - update


## Installation

```
pip install ardoqpy
```

## Dependencies

- Python 3
- [Requests](https://github.com/kennethreitz/requests) - ardoqpy uses requests package for http requests


## Quick Start
To get started, simply install ardoqpy, create an ArdoqClient object and call methods:

    edit `ardoq.cfg` to include your API token
    make sure `ardoqpy.py` opens your `ardoq.cfg`configuration file
    use `testclient.py`as a basis for your own client

or from the console

    from ardoqpy import ArdoqClient
    ardoq = ardoqpy.ArdoqClient(hosturl='https://YOURORG.ardoq.com', token='YOURTOKEN')
    # to use v2 API
    ardoq = ardoqpy.ArdoqClient(hosturl='https://YOURORG.ardoq.com', token='YOURTOKEN', version='v2')
    ardoq.get_workspaces()

## Changelog
- 202401
  - add get reference for v2 client
  - added v2 api client. This is a copy of the one provided by ardoq on the developer portal
- 202307
  - added workspace and workspaces endpoints for v2 client
- 202307
  - added del and update tag
- 202303
  - added audit log for support for components created, updated, deleted, and skipped due to cache_hit
- 202211
  - added support for Ardoq v2 REST API. Only for the ArdoqClient (not SyncClient)
- 202207
  - add find_reference_type to return reftype definition from the metamodel for a workspace 
  - add find_component_type to return comptype definition from the metamodel for a workspace. Checks full hierarchy

- 202204
  - add print_model to print component and reference IDs

- 20220228
  - add PR to include references in get_component function
  - fixed bug in ardoq_sync when logging ref without displayText

- 20220212
  - deprecated org parameter
  - removed problem with slash on url
  - change get all components in ws to search operation. In line with public API docs

- 20220131
  - fixed bug in SyncClient when searching for references in a WS without refs

- 20220122
  - changed get_model. calling without ws_id now returns all models 
  - added get_folder. returns all folders if no folder_id

- 20211107
  - improve simulation mode
  - added cache_miss_comps and cache_miss_refs lists to capture items found in ardoq that are no longer in the source systems

- 20210717
    - Added simulate option to SyncClient to simulate write operations to update the report without modifying ardoq

- 20210420
    - Fixed PyPy support

- 20170125
    - Added pip and fields creation support.

- 20160618
    - bug and feature improvements
    - first version of the sync client

- 20160402
    - Initial dev
    

## TODO
- complete the full REST-API for fields

## License
The ardoq-python-client is licensed under the MIT License

See LICENSE.md

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jbaragry/ardoq-python-client",
    "name": "ardoqpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "architecture ardoq REST API wrapper tool",
    "author": "Jason Baragry",
    "author_email": "jason.baragry@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ae/50/51909d04ae96085643be78bebd20d348cec7ab3b065b9d97b227c7cca552/ardoqpy-0.8.4.tar.gz",
    "platform": null,
    "description": "# Ardoqpy - a Python client for The Ardoq REST API\n\n## Description\n\nArdoqpy is a thin client library for the [Ardoq](https://ardoq.com) REST API.\nIt consists of 3 clients\n- ArdoqClient\n    - thin client for the rest-api\n- ArdoqSyncClient\n    - subclass of ArdoqClient\n    - maintains a cache of aggregated workspace information\n    - overrides write operations\n        - only create components and references if they are not already in the cache\n        - update cache for create and update operations\n        - cache hit is based on\n            - component: name, typeId\n                - NB: name match is CASE_INSENSITIVE\n            - reference: source, target, and type\n    - overriders find_component (comp_name)\n        - loads aggregated workspace to cache if its not present\n        - finds component based on either of the following \n            - name: substring or exact match\n            - fieldname == fieldvalue (you need to ensure the types can handle equivalence)\n                - fieldname, if not None, is checked first\n    - can be run in simulate mode which updates the report but does not execute write operations in ardoq\n- Ardoq V2 Client\n  - this is a copy of the client provided by ardoq in their developer portal\n  - v2 api functionality can be used from this client or built into the original ArdoqClient\n\n## Documentation\n(see the test client for examples)\n\n### ArdoqClient Import Usage\n```\nfrom ardoqpy import ArdoqClient\n```\n\nArdoqClient Implemented:\n- workspace\n    - get all\n        - summary=True is undocumented in the REST docs but returns stats for workspaces\n    - get by ID\n    - get by ID aggregated\n    - create workspace\n    - delete\n    - create folder\n    - move workspace to folder\n- component\n    - get by ID\n    - get all for workspace\n    - create\n    - delete\n    - update\n    - find by name in workspace\n    - find by field_name / field_value in workspace\n- reference\n    - get all for workspace\n    - get by ID\n    - create\n    - update\n    - delete\n- tag\n    - get by ID\n    - get all for workspace\n    - create\n    - update\n    - delete\n- model\n    - get by ID\n    - get all models and templates\n    - print model to get IDs for component and reference types\n    - find reference_type by name\n    - find component_type by name\n- folder\n  - create\n  - get by ID and all folders\n- util\n    - pprint\n        - pretty print responses from ardoq calls\n\n### ArdoqSyncClient Import Usage\n```\nfrom ardoqpy_sync import ArdoqSyncClient\nardoq = ArdoqSyncClient(hosturl=host, token=token)\nardoqsim = ArdoqSyncClient(hosturl=host, token=token, simulate=True)\n```\n\nArdoqSyncClient Implemented:\n- all interfaces from ArdoqClient\n- component\n    - create\n        - cache check is based on name attribute only (case insensitive)\n    - update\n- reference\n    - create\n        - cache check is based on source, target, and type attributes\n    - update\n\n\n## Installation\n\n```\npip install ardoqpy\n```\n\n## Dependencies\n\n- Python 3\n- [Requests](https://github.com/kennethreitz/requests) - ardoqpy uses requests package for http requests\n\n\n## Quick Start\nTo get started, simply install ardoqpy, create an ArdoqClient object and call methods:\n\n    edit `ardoq.cfg` to include your API token\n    make sure `ardoqpy.py` opens your `ardoq.cfg`configuration file\n    use `testclient.py`as a basis for your own client\n\nor from the console\n\n    from ardoqpy import ArdoqClient\n    ardoq = ardoqpy.ArdoqClient(hosturl='https://YOURORG.ardoq.com', token='YOURTOKEN')\n    # to use v2 API\n    ardoq = ardoqpy.ArdoqClient(hosturl='https://YOURORG.ardoq.com', token='YOURTOKEN', version='v2')\n    ardoq.get_workspaces()\n\n## Changelog\n- 202401\n  - add get reference for v2 client\n  - added v2 api client. This is a copy of the one provided by ardoq on the developer portal\n- 202307\n  - added workspace and workspaces endpoints for v2 client\n- 202307\n  - added del and update tag\n- 202303\n  - added audit log for support for components created, updated, deleted, and skipped due to cache_hit\n- 202211\n  - added support for Ardoq v2 REST API. Only for the ArdoqClient (not SyncClient)\n- 202207\n  - add find_reference_type to return reftype definition from the metamodel for a workspace \n  - add find_component_type to return comptype definition from the metamodel for a workspace. Checks full hierarchy\n\n- 202204\n  - add print_model to print component and reference IDs\n\n- 20220228\n  - add PR to include references in get_component function\n  - fixed bug in ardoq_sync when logging ref without displayText\n\n- 20220212\n  - deprecated org parameter\n  - removed problem with slash on url\n  - change get all components in ws to search operation. In line with public API docs\n\n- 20220131\n  - fixed bug in SyncClient when searching for references in a WS without refs\n\n- 20220122\n  - changed get_model. calling without ws_id now returns all models \n  - added get_folder. returns all folders if no folder_id\n\n- 20211107\n  - improve simulation mode\n  - added cache_miss_comps and cache_miss_refs lists to capture items found in ardoq that are no longer in the source systems\n\n- 20210717\n    - Added simulate option to SyncClient to simulate write operations to update the report without modifying ardoq\n\n- 20210420\n    - Fixed PyPy support\n\n- 20170125\n    - Added pip and fields creation support.\n\n- 20160618\n    - bug and feature improvements\n    - first version of the sync client\n\n- 20160402\n    - Initial dev\n    \n\n## TODO\n- complete the full REST-API for fields\n\n## License\nThe ardoq-python-client is licensed under the MIT License\n\nSee LICENSE.md\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python REST API wrapper for Ardoq - https://ardoq.com.",
    "version": "0.8.4",
    "project_urls": {
        "Homepage": "https://github.com/jbaragry/ardoq-python-client"
    },
    "split_keywords": [
        "architecture",
        "ardoq",
        "rest",
        "api",
        "wrapper",
        "tool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01a18f2bfca93139b31f6e0c249e5ec33d73a73643f6fdfb212896fceec31aa1",
                "md5": "48ae872fe42b07c6385a0295a3ff54be",
                "sha256": "d59e42bf624171ba6926e4db21a980fc3ee0af3fbc6a03e9103803ae54afefbe"
            },
            "downloads": -1,
            "filename": "ardoqpy-0.8.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48ae872fe42b07c6385a0295a3ff54be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14002,
            "upload_time": "2024-01-27T14:46:17",
            "upload_time_iso_8601": "2024-01-27T14:46:17.685913Z",
            "url": "https://files.pythonhosted.org/packages/01/a1/8f2bfca93139b31f6e0c249e5ec33d73a73643f6fdfb212896fceec31aa1/ardoqpy-0.8.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae5051909d04ae96085643be78bebd20d348cec7ab3b065b9d97b227c7cca552",
                "md5": "4fe37df4f42e77945b745fcaf6f1cd23",
                "sha256": "53c36bab832bccbcc320bce99e94ddad5d6e691316b42f3900f74bc6cf2e5c70"
            },
            "downloads": -1,
            "filename": "ardoqpy-0.8.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4fe37df4f42e77945b745fcaf6f1cd23",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15034,
            "upload_time": "2024-01-27T14:46:18",
            "upload_time_iso_8601": "2024-01-27T14:46:18.867448Z",
            "url": "https://files.pythonhosted.org/packages/ae/50/51909d04ae96085643be78bebd20d348cec7ab3b065b9d97b227c7cca552/ardoqpy-0.8.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-27 14:46:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jbaragry",
    "github_project": "ardoq-python-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ardoqpy"
}
        
Elapsed time: 0.38974s