Skip to main content

Python library for interfacing to the Aligni (PLM/MRP) API

Project description

Aligni Python

PyPI PyPI - Python Version PyPI - License


Source Code: https://github.com/mnorman-dev/aligni-python

PyPI: https://pypi.org/project/aligni-python/


Python library for interfacing to the Aligni (PLM/MRP) API v2

Full documentation of the underlying API is available at: https://api.aligni.com/v2/index.html

WARNING This code should be considered beta level at best. A good understanding of the underlying api is required to understand the data available for each datatype.

Usage

Below is a simple example of how to use this interface to query the parts in a library. This example uses the demo Aligni site at https://demo.aligni.com/.

import aligni.api

if __name__ == "__main__":
  sitename = "demo"  # Replace with sitename of Aligni account
  apikey = "oid3vLgynoy_Yl1gZkrgkLEq3J"  # Replace with API Key created from Aligni account

  aligni_api = aligni.api.API(sitename, apikey)
  aligni_parts = aligni_api.parts.get_list()
  aligni_total_part_count = len(aligni_parts)
  print("Aligni Part Count =", aligni_total_part_count)

Refer to tests to see further examples.

Installation

pip install aligni-python

Development

  • Clone this repository
  • Requirements:
  • Create a virtual environment and install the dependencies
poetry install
  • Activate the virtual environment
poetry shell

Testing

pytest

Pre-commit

Pre-commit hooks run all the auto-formatters (e.g. black, isort), linters (e.g. mypy, flake8), and other quality checks to make sure the changeset is in good shape before a commit/push happens.

You can install the hooks with (runs for each commit):

pre-commit install

Or if you want them to run only for each push:

pre-commit install -t pre-push

Or if you want e.g. want to run all checks manually for all files:

pre-commit run --all-files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aligni-python-0.0.1.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

aligni_python-0.0.1-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page