Skip to main content

API Client for Mediascout ORD

Project description

Mediascout ORD API client

Unofficial python client for ORD Mediascout API.

Installation

pip install ord-mediascout-client

Usage

from ord_mediascout_client import ORDMediascoutClient, \
    ORDMediascoutConfig, CreateClientWebApiDto, \
    ClientRelationshipType, LegalForm

config = ORDMediascoutConfig(
    url='http://localhost:5000',
    username='username',
    password='password',
)

api = ORDMediascoutClient(config)

client_dto = CreateClientWebApiDto(
    createMode=ClientRelationshipType.DirectClient,
    legalForm=LegalForm.JuridicalPerson,
    inn="1234567890",
    name="Test Client",
    mobilePhone="1234567890",
    epayNumber=None,
    regNumber=None,
    oksmNumber=None
)

response_client_dto = api.create_client(client_dto)

Testing

Get credentials for accessing https://demo.mediascout.ru/ and put them into .env file (see .env.example.env)

First setup virtual environment (once):

pipenv install --dev
pipenv install -e .

To run tests:

pipenv shell
pytest

Packaging

pipenv install --dev
pipenv shell

# update version
vi pyproject.toml

# clean up files from dist/* before deploy not to upload old ones
# rm dist/*

# create new build
python -m build

# upload fresh build
python -m twine upload dist/*

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

ord_mediascout_client-0.0.26.tar.gz (79.4 kB view hashes)

Uploaded Source

Built Distribution

ord_mediascout_client-0.0.26-py3-none-any.whl (13.9 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