Skip to content

autodesk-platform-services/aps-dx-tools-python

Repository files navigation

Data Exchange CLI Tool

ver pep8

Stackoverflow License

Description

This is a Python sample, created in form of a CLI tool that helps to automate the process of reading and creating exchanges from ACC. The code was build in a such way that the included data_exchange lib can be easily reused in other projects.

Thumbnail

thumbnail

Dependencies

  • Python: Download Python. It is required to use Python > 3.13.
  • APS Account: Learn how to create an APS Account, activate subscription and create an app at this tutorial.

Running locally

The Data Exchange calls requires 3-legged authenticated token. To simplify the sample and have only the minimum necessary code focused on Data Exchange, the Authentication code is missing. To run the sample, it is required to have the 3-legged authenticated token and set the AUTH_TOKEN var within config.py file.

Within the project folder:

  1. Create a virtual environment:
    python -m venv venv
  1. Activate the virtual environment:

For Windows:

    venv\Scripts\activate.bat

For Linux/MacOS systems:

    source venv/bin/activate
  1. Install dependencies via pip:
    pip install -r requirements.txt
  1. The app can be called by running
    python main.py

or you can set an alias:

alias dx-tools="python3 main.py"

and call the app with further commands:

dx-tools gethubs

For the entire list of commands check the documentation for the app.

Demo Video

Click the image below to check the demo video: dx-tools Workflow

Knowing issues

  • For brevity purpose, the error handling is missing from the code and almost all errors will default to "ERROR: The Auth token expired"

Further Reading

License

These samples are licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Authors

Denis Grigor ([email protected]), APS Partner Development

See more at Developer Community Blog.

About

Data Exchange CLI Tool to visualize and create exchanges

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages