Skip to main content

PyMOSP

Latest release License Workflow PyPi version

PyMOSP is a Python library to access MOSP.

Installation

Use it as a command line tool

$ pipx install pyPyMOSPmosp
installed package pymosp 0.5.3, Python 3.13.0
These apps are now globally available
  - pymosp
done! ✨ 🌟 ✨

$ export MOSP_URL_API=https://objects.monarc.lu/api/v2/
$ export TOKEN=<YOUR-TOKEN>

$ pymosp object --list
{'metadata': {'count': '5074', 'offset': '0', 'limit': '10'}, 'data': [{'id': 144, 'name': 'Use of an obsolete version of the messaging server', 'description': '', 'schema_id': 14, 'org_id': 4, 'last_updated': '2021-03-16T12:45:35.046659', 'json_object': {'code': '1118', 'uuid': '69fc03a0-4591-11e9-9173-0800277f0571', 'label': 'Use of an obsolete version of the messaging server', 'language': 'EN', 'description': ''}, 'organization': {'id': 4, 'name': 'MONARC', 'description': 'MONARC is a tool and a method allowing an optimised, precise and repeatable risk assessment.', 'organization_type': 'Non-Profit', 'is_membership_restricted': True, 'last_updated': '2018-05-18T09:50:57'}, 'licences': None},  ... ,  {'id': 284, 'name': 'Tempting equipment (trading value, technology, strategic)', 'description': '', 'schema_id': 14, 'org_id': 4, 'last_updated': '2021-03-16T12:45:33.862787', 'json_object': {'code': '278', 'uuid': '69fc0ee2-4591-11e9-9173-0800277f0571', 'label': 'Tempting equipment (trading value, technology, strategic)', 'language': 'EN', 'description': ''}, 'organization': {'id': 4, 'name': 'MONARC', 'description': 'MONARC is a tool and a method allowing an optimised, precise and repeatable risk assessment.', 'organization_type': 'Non-Profit', 'is_membership_restricted': True, 'last_updated': '2018-05-18T09:50:57'}, 'licences': None}]}

Use it as a Python library

pip install PyMOSP
import pymosp, os
mosp = pymosp.PyMOSP(os.getenv("MOSP_URL_API"), os.getenv("TOKEN"))
params = {"organization": "MONARC", "schema": "Library objects"}
r = mosp.objects(params=params)
print(r)

or via the Git repository:

$ git clone https://github.com/NC3-LU/PyMOSP
$ cd PyMOSP
$ poetry install
$ poetry run nose2 -v --pretty-assert

Documentation

A documentation is available on the MONARC website.

Examples

See the examples in the file example.py or in the tests folder.

License

This software is licensed under GNU General Public License version 3.

  • Copyright (C) 2019-2025 Cédric Bonhomme
  • Copyright (C) 2019-2025 LHC

For more information, the list of authors and contributors is available.

Metadata

Release files for PyMOSP 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyMOSP 0.5.3
File Size Uploaded
pymosp-0.5.3.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyMOSP 0.5.3
File Interpreter ABI Platform
pymosp-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / pymosp-0.5.3.tar.gz

Download URL pymosp-0.5.3.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7c177e3be1d41b7d6cc3806e57953097fd35676a08061e6d955192afd4e0aa2e
BLAKE2b-256 checksum
How to use checksums
9d1549a1cbed1f2f4d096baa7864e1e12dd9a5d956fdcd7cb9fe007e765b083a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2025.

Transparency log

Release files / pymosp-0.5.3-py3-none-any.whl

Download URL pymosp-0.5.3-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b091deef8d93c9279e9f0ab829346c52beebd6c4405b4471681534044337be60
BLAKE2b-256 checksum
How to use checksums
1dd315398be79ba052ad2693a3710990d7b2a4373166c91e4a4f460433cda8ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.3 This release

2 release files

0.5.2

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page