Skip to main content

This Python API client provides access to masmovil core API domains

Project description

Latest Release pipeline status coverage report

:warning: WORK IN PROGRESS :warning:

This Python API client provides access to masmovil core API domains.

Resources

  • Feasibility

    • Coverage - find an address
      • Streets:
        • search: returns a list of street by text
        • get_building_info_by_street: returns a list of building info by street id
      • Buildings:
        • search: returns a list of buildings by text
        • multi_search: returns a list of buildings by request body
        • get: returns a building by id with a list of units
      • Units:
        • get: returns a unit by id with a list of coverages
        • get_coverage: returns coverage info for a unit id and territory_owner
    • Portability - Checks if a landline portability or an access transfer is allowed
      • PortabilityCheck:
        • check: Returns whether the portability process can be carried out and whether it requires a new installation
  • Customers

    • Signups - access to signups new clients
      • post new client
    • Users
      • returns customer tree data associated to a given document identification, email or number of the client.
      • returns user data by userId
  • Catalogue

    • bundled_products - access to bundled products
      • Sellable:
        • get: Returns sellable bundled products
  • Provision inventory network

    • fixed - Obtain fixed numbering for sale
      • get number

Installation

$ pip install masstack-python-client

Configuration Environment

You need define the Masstack CLIENT_EMAIL, PRIVATE_KEY_ID TOKEN_URI, MASSTACK_DOMAIN and PRIVATE_KEY in BASE64 as environment variables to request access toekn. You need define:

MASSTACK_CLIENT_EMAIL=<YOUR CLIENT EMAIL>
MASSTACK_PRIVATE_KEY_ID=<YOUR PRIVATE KEY ID>
MASSTACK_TOKEN_URI=<MASSTACK TOKEN URI>
MASSTACK_PRIVATE_KEY_BASE64=<YOUR PRIVATE KEY in BASE64>
MASSTACK_DOMAIN=<MASSTACK DOMAIN>

If this envvars are not defined, a exception will be raised with the name of the envvar not defined.

Optional TOKEN_STORE_PATH environment variable to store token, if is not defined by defect is /tmp/masstack.token

MASSTACK_TOKEN_STORE_PATH=<YOUR PATH>

To all resources need define ORG_ID

MASSTACK_ORG_ID=<MASSTACK ORG ID>

For coverage resources need define COVERAGE_SEGMENT and COVERAGE_CHANNEL

MASSTACK_COVERAGE_SEGMENT=<SF SEGMENT>
MASSTACK_COVERAGE_CHANNEL=<SF CHANNEL>

Development

Setup environment

  1. Install pyenv
curl https://pyenv.run | bash
  1. Build the Python version
pyenv install 3.11.9
pyenv install 3.8.6
  1. Create a virtualenv
pyenv virtualenv 3.11.9 masstack-python-client
  1. Activate virtualenv
pyenv activate masstack-python-client
  1. Install dependencies
pyenv exec pip install -r requirements-dev.txt
  1. Install pre-commit hooks
pyenv exec pre-commit install
  1. To execute tests in local
pyenv local 3.11.9 3.8.6
  1. Execute tests with Tox
pyenv exec tox

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

masstack_python_client-0.2.0.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

masstack_python_client-0.2.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file masstack_python_client-0.2.0.tar.gz.

File metadata

  • Download URL: masstack_python_client-0.2.0.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for masstack_python_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 15bb7396909ae9fa7f6d3304c179cca8e21a5cc2a316cb94017ef82420d63aae
MD5 744e1de31505d9d4d9654937a8e304af
BLAKE2b-256 84aa3f294ca02d39f9d68a0281d16b764c8c79217670900fd64a66b221f85df9

See more details on using hashes here.

File details

Details for the file masstack_python_client-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for masstack_python_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 354a07a8cdb67dc79819f2af5ff260b50a0e099303b63ead882ad9b6ec89b4d8
MD5 17e1c4e5232dd1ed201ec10eb64cebf3
BLAKE2b-256 ef80aa0c094ca0b1afe8ba9fd3a787d7cbf15d8d7e502d483e58d75946acdbe1

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