Skip to main content

Пакет для взаимодействия с ФМС

Project description

Пример использования

1. Указываем параметры конфигурации

config_params = {
    'wsdl_url': settings.WSDL_URL,
    'certificate_path': cert_path,
    'private_key_path': key_path,
    'private_key_pass': settings.SMEV_PRIVKEY_PASS,
    'smev_sender_code': settings.SMEV_SENDER_CODE,
    'smev_sender_name': settings.SMEV_SENDER_NAME,
    'recipient_code': settings.RECIPIENT_CODE,
    'recipient_name': settings.RECIPIENT_NAME,
    'system_okato': settings.OKATO,
    'region_code': settings.REGION_CODE
}
config = FmsRequestConfig(**config_params)

2. Создаем экземпляр клиента

fms_client = FmsClient(config)

3. Выполняем запрос с параметрами

request_params = {
    'RequestIdRef': fms_request.request_id_ref,
    'OriginRequestIdRef': fms_request.origin_request_id_ref,
    'taskId': fms_request.query_id,
}
result = fms_client.request('getResult', request_params)

4. Пример обработки результата

err_code = result.MessageData.AppData.errorCode
error_description = result.MessageData.AppData.errorDescription

if err_code == FmsClient.RC_REQUEST_ACCEPTED:
    last_sent = fms_client.last_sent
    last_received = fms_client.last_received
    # save results
else:
    # process error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

edufms-0.2.8-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file edufms-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: edufms-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for edufms-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6041ed033fb622e8b8b665bd1a3d4b223e6c66da66c08063c68b5c3f44b2cd4e
MD5 2ddbf0aad3c6a24629fe544cace84e2b
BLAKE2b-256 df544752ee7ce437ca614a735f4bf50209437d5cb332727ee738dc0c8bfc54f1

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