Skip to main content

Пакет pghist-client предоставляет клиент для работы с сервисом pgchangehistory.

Возможности

  • Выполнение запросов к сервису логирования с учётом фильтров pgchangehistory.
  • Предобработка результатов выполнения запросов.
  • Представление результатов в виде dataclass'ов.
  • Предоставление провайдера HistoryDataProvider для работы с данными.

Системные требования

Установка и подключение

Установка:

  $ pip install pghist-client

Настройка:

  INSTALLED_APPS += [
      'rest_framework',
      'pghist_client',
  ]

  PGHIST = dict(
      API_URL='http://pgchangehistory.api.url/',
      TIMEOUT=5,
      USE_SIMPLE_SERVER=False,
      OAUTH2=dict(
          ACCESS_TOKEN='token_to_access',
          TOKEN_URL='http://pgchangehistory.api.url/oauth2/token/',
          CLIENT_ID='client_id',
          CLIENT_SECRET='client_secret',
          USERNAME='username',
          PASSWORD='******',
      ),
  )

Настройки

  • API_URL --- URL API сервера pgchangehistory.
  • TIMEOUT --- timeout запроса к серверу pgchangehistory в секундах.
  • USE_SIMPLE_SERVER --- Флаг использования сервиса без авторизации (при True потребуется какой-либо дефолтный ACCESS_TOKEN, имеющийся в сервисе).
  • ACCESS_TOKEN --- Токен доступа к сервису (требуется только при использовании сервиса без авторизации).
  • OAUTH2 --- Блок параметров для OAUTH2 авторизации (необходимы при USE_SIMPLE_SERVER=False):
    • TOKEN_URL --- URL для получения токена, должен использоваться HTTPS.
    • CLIENT_ID --- ID клиента, созданный на стороне REST-сервера.
    • CLIENT_SECRET --- Секретный ключ клиента, созданный на стороне REST-сервера.
    • USERNAME --- username пользователя для получения токена.
    • PASSWORD --- password пользователя для получения токена.

Metadata

Release files for pghist-client 0.2.0

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

Source distribution (sdist)

Source distribution for pghist-client 0.2.0
File Size Uploaded Provenance Actions
pghist_client-0.2.0.tar.gz 11.3 kB Without provenance Details for pghist_client-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pghist-client 0.2.0
File Interpreter ABI Platform Actions
pghist_client-0.2.0-py3-none-any.whl Python 3 none any Details for pghist_client-0.2.0-py3-none-any.whl

Total release size: 23.8 kB

Release files / pghist_client-0.2.0.tar.gz

Download URL pghist_client-0.2.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
482e74de8bf69b1798dfbab4100abcaa8ceaad764b5f9ea8c91910f839167f56
BLAKE2b-256 checksum
How to use checksums
3ab98872142746cec4f6594973834a0c225b689a9f97c33113a957a6549abf11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / pghist_client-0.2.0-py3-none-any.whl

Download URL pghist_client-0.2.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2eef48ed5d8c3793a6884ffbfd46a7bb0e081b332e4b05441dc60c09cc4d9fc2
BLAKE2b-256 checksum
How to use checksums
fff7f84961277d8de64b64d7ec4f16b14ab8a1f2c9c29c0ac81c66833262433b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for pghist-client 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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