Skip to content

M&E Data Model CLI Tool that helps to automate the process of reading collections, projects and assets

Notifications You must be signed in to change notification settings

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEDM 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 collections, projects and assets using the M&E Data Model GraphQL API.

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 M&E Data Model, the Authentication code is missing on purpose. 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 medm="python3 main.py"

and call the app with further commands:

medm getcollections

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

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"

License

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

Authors

Denis Grigor (denis.grigor@autodesk.com), APS Partner Development

See more at Developer Community Blog.

About

M&E Data Model CLI Tool that helps to automate the process of reading collections, projects and assets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages