Python library for interfacing to the Aligni (PLM/MRP) API
Project description
Aligni Python
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:
- Poetry
- Python 3.7+
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aligni-python-0.0.1.tar.gz
.
File metadata
- Download URL: aligni-python-0.0.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a8d4525bd7e42bc2c7415d380b9bec80ecca3c73e7189af8efc78461ef4e332 |
|
MD5 | 0044e3fad1277534d528167f4ca8e4b0 |
|
BLAKE2b-256 | 5209a5120eb714c34daae2188b53e6e9c0313f2134a470e4e50d03597f5a1f0b |
File details
Details for the file aligni_python-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: aligni_python-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7b5062c775fcf725e148bd0e56ed622cc7bc694aaa74cd32ce0e862d161d13c |
|
MD5 | ab94e92ee3c5aa2d2bdfbe758a3386b6 |
|
BLAKE2b-256 | 8f67153e1be1dc00ac63f2d49c2076840b109dcfcc7a565f3ebfe506ea82d5d5 |