Skip to main content

Mat3ra.com Python Client for RESTful API

Project description

PyPI version

This package provides access to Mat3ra.com RESTful API.

Installation

We recommend creating a virtual environment before installing:

virtualenv my-virtualenv
source my-virtualenv/bin/activate

Install using pip:

  • from PyPI:
pip install mat3ra-api-client
  • from source code in development mode:
git clone git@github.com:Exabyte-io/api-client.git
cd api-client
pip install -e .

Usage

from mat3ra.api_client import APIClient

# Authenticate with OIDC token
client = APIClient.authenticate()

# Access endpoints
materials = client.materials.list()

Examples

api-examples repository contains examples for performing most-common tasks in the Mat3ra.com platform through its RESTful API in Jupyter Notebook format.

Testing

The package uses pytest for testing. Tests are organized into unit and integration tests.

Running Tests

Unit Tests (No environment setup required)

Run all unit tests:

pytest tests/py/unit

Integration Tests (Requires API credentials)

Integration tests require the following environment variables to be set:

  • TEST_HOST - API host (e.g., platform.mat3ra.com)
  • TEST_PORT - API port (e.g., 443)
  • TEST_ACCOUNT_ID - Your account ID
  • TEST_AUTH_TOKEN - Your authentication token
  • TEST_SECURE - Use HTTPS (optional, default: False)
  • TEST_VERSION - API version (optional, default: 2018-10-01)

To run integration tests:

export TEST_HOST=platform.mat3ra.com
export TEST_PORT=443
export TEST_ACCOUNT_ID=your-account-id
export TEST_AUTH_TOKEN=your-auth-token
export TEST_SECURE=true

pytest tests/py/integration

Run All Tests

pytest tests/py

Run Tests with Coverage

pytest tests/py/unit --cov=mat3ra.api_client --cov-report=term --cov-report=html

Note: Integration tests will be automatically skipped if required environment variables are not set.

© 2020 Exabyte Inc.

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

mat3ra_api_client-2026.4.14.post0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mat3ra_api_client-2026.4.14.post0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file mat3ra_api_client-2026.4.14.post0.tar.gz.

File metadata

  • Download URL: mat3ra_api_client-2026.4.14.post0.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/9.0.0 pkginfo/1.12.1.2 requests/2.33.1 requests-toolbelt/1.0.0 tqdm/4.67.3 CPython/3.10.13

File hashes

Hashes for mat3ra_api_client-2026.4.14.post0.tar.gz
Algorithm Hash digest
SHA256 11f26613070016329a2adf7162102df56dcf0e06c017bc3d9e918509a4385c54
MD5 c39475a9651bab6e888097bf9c0787b0
BLAKE2b-256 f9496e9d60840f94ad14d2c92774e9ef7adb1648b7432f0b2800e3b477a75f87

See more details on using hashes here.

File details

Details for the file mat3ra_api_client-2026.4.14.post0-py3-none-any.whl.

File metadata

  • Download URL: mat3ra_api_client-2026.4.14.post0-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/9.0.0 pkginfo/1.12.1.2 requests/2.33.1 requests-toolbelt/1.0.0 tqdm/4.67.3 CPython/3.10.13

File hashes

Hashes for mat3ra_api_client-2026.4.14.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 75057964f74a5de44a35239bf804241e989aed5838a92c87df7cfca945a546f2
MD5 b3e66c652095c5411730b3e93d481b65
BLAKE2b-256 de2fb6da1a4f7bb4e679eb0ff73d93052289403169faade120014c3fccec024e

See more details on using hashes here.

Supported by

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