معرفی شرکت ها


directory-sso-api-client-7.1.2


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Python API client for Export Directory.
ویژگی مقدار
سیستم عامل -
نام فایل directory-sso-api-client-7.1.2
نام directory-sso-api-client
نسخه کتابخانه 7.1.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Department for International Trade
ایمیل نویسنده -
آدرس صفحه اصلی https://github.com/uktrade/directory-sso-api-client
آدرس اینترنتی https://pypi.org/project/directory-sso-api-client/
مجوز MIT
# directory-sso-api-client [![code-climate-image]][code-climate] [![circle-ci-image]][circle-ci] [![codecov-image]][codecov] [![pypi-image]][pypi] [![semver-image]][semver] **[Directory SSO API client](https://great.gov.uk/)** --- ## Installation ```sh $ pip install directory-sso-api-client ``` The api client expects the following settings: | Setting | Notes | | ---------------------------------------- | ----------------------------------------------------------- | | DIRECTORY_SSO_API_CLIENT_BASE_URL | | | DIRECTORY_SSO_API_CLIENT_API_KEY | Unique to client. Retrieved during the on-boarding process. | | DIRECTORY_SSO_API_CLIENT_SENDER_ID | Unique to client. Retrieved during the on-boarding process. | | DIRECTORY_SSO_API_CLIENT_DEFAULT_TIMEOUT | | Once that is done the API client can be used: ```py from directory_sso_api_client.client import sso_api_client ``` ## Authentication backend Add the following to your settings ``` AUTHENTICATION_BACKENDS = ['directory_sso_api_client.backends.SSOUserBackend'] AUTH_USER_MODEL='directory_sso_api_client.SSOUser', MIDDLEWARE_CLASSES = [ ... 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ... ``` That will result in the user being authenticate via their sso session cookie and then attached to `request.user`. ## Development ```shell $ git clone https://github.com/uktrade/directory-sso-api-client $ cd directory-sso-api-client $ [create virtual environment and activate] $ pip install -r requirements_test.txt ``` ## Publish to PyPI The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine: | Setting | | --------------------------- | | DIRECTORY_PYPI_USERNAME | | DIRECTORY_PYPI_PASSWORD | Then run the following command: ```sh make publish ``` [code-climate-image]: https://codeclimate.com/github/uktrade/directory-sso-api-client/badges/issue_count.svg [code-climate]: https://codeclimate.com/github/uktrade/directory-sso-api-client [circle-ci-image]: https://circleci.com/gh/uktrade/directory-sso-api-client/tree/master.svg?style=svg [circle-ci]: https://circleci.com/gh/uktrade/directory-sso-api-client/tree/master [codecov-image]: https://codecov.io/gh/uktrade/directory-sso-api-client/branch/master/graph/badge.svg [codecov]: https://codecov.io/gh/uktrade/directory-sso-api-client [pypi-image]: https://badge.fury.io/py/directory-sso-api-client.svg [pypi]: https://badge.fury.io/py/directory-sso-api-client [semver-image]: https://img.shields.io/badge/Versioning%20strategy-SemVer-5FBB1C.svg [semver]: https://semver.org


نیازمندی

مقدار نام
<=7.1.1,>=6.2.0 directory-client-core
<3.2.15,>=2.2.10 django
==23.1.0 black
==3.8.4 flake8
==5.6.4 isort
- pytest-cov
<4.0.0,>=3.8.0 pytest-django
<1.0.0,>=0.9.2 pytest-sugar
==5.3.5 pytest
- pytest-codecov
- GitPython
<3.0.0,>=2.22.0 requests
==1.7.0 requests-mock
<50.0.0,>=45.2.0 setuptools
<4.0.0,>=3.1.1 twine
<1.0.0,>=0.34.2 wheel


نحوه نصب


نصب پکیج whl directory-sso-api-client-7.1.2:

    pip install directory-sso-api-client-7.1.2.whl


نصب پکیج tar.gz directory-sso-api-client-7.1.2:

    pip install directory-sso-api-client-7.1.2.tar.gz