Saravanan666/pypi-org huggingface dataset:
Package: python-jwt-fork
python-jwtpython-jwtis a JSON Web Token (JWT) implementation in Python developed byGehirn Inc.Examplesimportjsonfromdatetimeimportdatetime,timedelta,timezonefromjwtimport(JWT,jwk_from_dict,jwk_from_pem,)fromjwt.utilsimportget_int_from_datetimeinstance=JWT()message={'iss':'https://example.com/','sub':'yosida95','iat':get_int_from_datetime(datetime.now(timezone.utc)),'exp':get_int_from_datetime(datetime.now(timezone.utc)+timedelta(hours=1)),}"""
Encode the message to JWT(JWS).
"""# Load a RSA key from a JWK dict.signing_key=jwk_from_dict({'kty':'RSA','e':'AQAB','n':'...','d':'...'})# Or load a RSA key from a PEM file.withopen('rsa_private_key.pem','rb')asfh:signing_key=jwk_from_pem(fh.read())# You can also load an octet key in the same manner as the RSA.# signing_key = jwk_from_dict({'kty': 'oct', 'k': '...'})compact_jws=instance.encode(message,signing_key,alg='RS256')"""
Decode the JWT with verifying the signature.
"""# Load a public key from PEM file corresponding to the signing private key.withopen('rsa_public_key.json','r')asfh:verifying_key=jwk_from_dict(json.load(fh))message_received=instance.decode(compact_jws,verifying_key,do_time_check=True)"""
Successfuly retrieved the `message` from the `compact_jws`
"""assertmessage==message_receivedInstallationYou can install python-jwt with pip.$pipinstalljwtImplementation DetailsSupported AlgorithmsUnsecurednone (disabled by default for security)SymmetricHS256HS384HS512AsymmetricPS256PS384PS512RS256RS384RS512Supported Python VersionsPython 3.6+Licensepython-jwt is licensed under the Apache License version 2.  See ./LICENSE.rst.
Package: python-k8sclient
=============================================python-k8sclient - Kubernetes API client code=============================================Overview--------This is Kubernetes API python client code. This code is generated byswagger-codegen. Kubernetes provide swagger-spec to generate client code fordifferent versions. The specs live in Kubernetes repo.* Free software: Apache license* Documentation: http://docs.openstack.org/developer/python-k8sclient* Source: http://git.openstack.org/cgit/openstack/python-k8sclient* Bugs: http://bugs.launchpad.net/python-k8sclientSee also--------* swagger-codegen: https://github.com/swagger-api/swagger-codegen* Kubernetes swagger-spec: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/api/swagger-specPrerequisites-------------You need to install required packages for swagger codegen. Please refer to`<https://github.com/swagger-api/swagger-codegen#prerequisites>`_Steps to generate API client code---------------------------------Steps to generate Kubernetes client code for v1:* Clone the python-k8sclient repo::git clone https://git.openstack.org/openstack/python-k8sclient* Clone the swagger-codegen repo. It is recommended to checkout a release(e.g. v2.1.3) instead of using the master branch::git clone https://github.com/swagger-api/swagger-codegen.gitcd swagger-codegen/git checkout tags/v2.1.3* Build swagger-codegen::mvn package* Update the v1.json from latest Kubernetes release::curl -o ./k8sclient/templates/v1.json https://raw.githubusercontent.com/kubernetes/kubernetes/v1.2.2/api/swagger-spec/v1.json* Run below command to generate the API client code for Kubernetes::cd ..java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \generate \-i ./k8sclient/templates/v1.json \-l python -o ./KubernetesClientCodeNow you can check the code at location ./KubernetesClientCode.
Package: python-kafka-logger
Simple python logging handler for forwarding logs to a kafka server.The handler uses a logstash formatter.Installing$pipinstallpython-kafka-loggerHow to useExample for using the handler within a native logging.conf fileexample/logging.confGet the projectClone the git repository$gitclonehttps://github.com/avihoo/python-kafka-logging/Install a virtualenv$sudoapt-getinstallpython-virtualenvCreate a new virtualenv$virtualenvpython-kafka-logging-veInstall project’s requirements$python-kafka-logging-ve/bin/pipinstall-rrequirements.txtReporting IssuesIf you have suggestions, bugs or other issues specific to this library, file themhereor contact me at avihoo.mamka <at> gmail <dot> com.keywords: python, logging, handler, example, kafka, logs, logstash, formatter
Package: python-kafka-logging
Simple python logging handler for forwarding logs to a kafka server.The handler uses a logstash formatter.Installing$pipinstallpython_kafka_loggingHow to useExample for using the handler within a native logging.conf fileexample/logging.confGet the projectClone the git repository$gitclonehttps://github.com/taykey/python-kafka-logging/Install a virtualenv$sudoapt-getinstallpython-virtualenvCreate a new virtualenv$virtualenvpython_kafka_logging_veInstall project’s requirements$python_kafka_logging_ve/bin/pipinstall-rrequirements.txtReporting IssuesIf you have suggestions, bugs or other issues specific to this library, file themhereor contact me at avihoo <at> taykey <dot> com.keywords: python, logging, handler, example, kafka, logs, logstash, formatter
Package: python-kairosdb
kairosdb - Python library to interface the KairosDB REST API (kairosdb.github.io)Author:Denis ‘jawa’ Pompilio <denis.pompilio@gmail.com>Contact:Denis ‘jawa’ Pompilio <denis.pompilio@gmail.com>Sources:https://github.com/outini/python-kairosdb/This package provides a simple python library to interface the KairosDB REST API.
Please read also:https://kairosdb.github.io/docs/build/html/restapi/index.html.InstallationInstall python-kairosdb module fromhttps://pypi.python.org:pip install python-kairosdbInstall python-kairosdb module from sources:python setup.py installDebian binary packages are also available. See thepackagingdirectory for
more information.DocumentationDocumentation is available online:http://python-kairosdb.readthedocs.io/en/latest/index.htmlExamplesimportkairosdbif__name__=="__main__":KDB_CLIENT=kairosdb.client.KairosDBAPIClient(api_endpoint="https://kdb.domain.tld:4443/api/v1")KDB_API=kairosdb.KairosDBAPI(KDB_CLIENT)print(KDB_API.version)print(KDB_API.health_status)print(KDB_API.health_check)print(KDB_API.metricnames)print(KDB_API.tagnames)print(KDB_API.query_metrics({"metrics":[{"name":"my_metric","group_by":[{"name":"tag","tags":['host']}],"aggregators":[{"name":"avg","align_sampling":True,"sampling":{"value":30,"unit":"seconds"}}]}],"cache_time":0,"start_relative":{"value":"2","unit":"hours"}})LicenseMIT LICENSE(see LICENSE file)
Package: python-kakaobot
Super simple framework for Kakaotalk auto-reply bot based on aiohttpExampleFromexamples/simple_echo.py:fromkakaobotimportKakaoBotbot=KakaoBot()@bot.on_messageasyncdefhandle_message(message,**args):ifargs['type']=='text':return'Echoing:%s'%messageelse:return'Cannot understand'if__name__=='__main__':bot.run(host='0.0.0.0',port=8080)Nice, isn’t it?Why not Flask or Django?Because setting up full Flask/Django development environment is a bit of pain,
especially for this kind of tiny application with no front-end view.
It is well-known using default development server for Flask/Django is not the way
you run your web application. But in aiohttp, it is. That’s why I chose aiohttp.
Package: python-kaltura
This source contains:- The Kaltura client library (KalturaClient.py & KalturaClientBase.py)- Auto generated core APIs (KalturaCoreClient.py)- Auto generated plugin APIs (KalturaPlugins/*.py)- Python library test code and data files (TestCode/*)- The 'poster' python module (used by KalturaClient.py)== STANDARD DEPENDENCIES ==The API library depends on the following python modules (included with python by default):- email.header- hashlib- httplib- mimetypes- os- re- socket- sys- time- urllib- urllib2- uuid or random & sha- xml.dom- xml.parsers.expat== EXTERNAL DEPENDENCIES ==The API library depends on the following python modules that are not included by default with python:- setuptools - can be downloaded from https://pypi.python.org/pypi/setuptools- poster - can be downloaded from https://pypi.python.org/pypi/poster/installed by running: python setup.py install== INSTALLATION ==Make sure you have the modules listed under the 'external dependencies' installed.Install the Kaltura client by running 'python setup.py install' from the same folder as this README file.== TESTING THE CLIENT LIBRARY ==See KalturaClient/tests/README.txt== RELEASE NOTES ==Aug 2013 - the library was refactored to make it installable as a PyPI package.This refactoring changed the way Kaltura client plugin modules are loaded -before the change the metadata plugin (for example) was loaded by:from KalturaMetadataClientPlugin import *when upgrading the client, this will need to be changed to:from KalturaClient.Plugins.Metadata import *
Package: python-kanban
A terminal-based interface written in pure Python for a very plain Kanban board.Installationpipinstallpython-kanbanUsageThe simplest way to execute it is to runpython_kanbanin the command line. The navigation keys are (or should be) self-explanatory in the
application.This will create akanban.dbdatabase file in the current folder. After
quitting and runningpython_kanbanagain the same database will be loaded
and the tasks are persisted.If you wish to customize the database file or simply manage multiple files, you
can set an environment variable with:exportDYNACONF_DB_FILE=another_database_file.dband it will either create anotheranother_database_file.dbfile or load it
if already existing.This is still a work in progress, the looks may be rough in the edges, but most of the main functionality is there already.Check therepository pagefor more information.
Package: python-kanbanize
InstallationTo install just:$ easy_istall python-kanbanizeor:$ pip install python-kanbanizeUsageGetting started:from python_kanbanize.wrapper import Kanbanize

k = Kanbanize(<your api key here>)
k.get_all_tasks(<boardid>)NoteThe wrapper will reproduce all the methods available at:http://kanbanize.com/ctrl_integrationChangelog0.2.0Switched from restkit to requests library
Made create_new_task work passing parameters into POST BODY
Renamed main module from “kanbanize” to “python-kanbanize”
Added logging messages
Package: python-karborclient
Team and repository tagsKarborKarbor Mission StatementFormalize Application Data Protection in OpenStack (APIs, Services, Plugins, …)Be able to protect Any Resource in OpenStack(as well as their dependencies)Allow Diversity of vendor solutions, capabilities and implementations
without compromising usabilityPyPi- package installationLaunchpad project- release managementBlueprints- feature specificationsBugs- issue trackingSourceSpecsHow to ContributePython Karborclientpython-karborclient is a client library for karbor built on the karbor API.
It provides a Python API (thekarborclientmodule) and a command-line tool
(karbor).Project ResourcesProject status, bugs, and blueprints are tracked on Launchpad:Client bug trackerhttps://launchpad.net/python-karborclientKarbor bug trackerhttps://launchpad.net/karborDeveloper documentation can be found here:https://docs.openstack.org/karbor/latest/Additional resources are linked from the project wiki page:https://wiki.openstack.org/wiki/karborLicenseApache License Version 2.0http://www.apache.org/licenses/LICENSE-2.0
Package: pythonkc-meetups
A clean, minimal client to the Meetup.com API for retrieving Meetup events for
thePythonKC group.Example Usage>>> from pythonkc_meetups import PythonKCMeetups
>>> meetups = PythonKCMeetups(api_key='<your API key here>')
>>> next_meetup = meetups.get_upcoming_events()[0]
>>> next_meetup.name
u'Hackathon!'
>>> next_meetup.time
datetime.datetime(2011, 8, 13, 10, 0, tzinfo=tzoffset(None, -18000))
>>> next_meetup.venue.name
u"Salva O'Renick"
>>> next_meetup.venue.lat, next_meetup.venue.lon
(39.091053, -94.576996)
>>> next_meetup.yes_rsvp_count
9
>>> next_meetup.event_url
u'http://www.meetup.com/pythonkc/events/25940081/'
>>> last_meetup = meetups.get_past_events()[0]
>>> last_meetup.name
u'Monthly Meetup: Google App Engine'
>>> last_meetup.time
datetime.datetime(2011, 7, 9, 14, 0, tzinfo=tzoffset(None, -18000))
>>> an_attendee = last_meetup.attendees[0]
>>> an_attendee.name
u'Steven Cummings'
>>> an_attendee.photo.thumb_url
u'http://photos1.meetupstatic.com/photos/member/2/e/f/5/thumb_16212021.jpeg'
>>> last_meetup.photos[0].url
u'http://photos1.meetupstatic.com/photos/event/1/7/0/d/600_47705901.jpeg'
Package: pythonKdb
qPythonqPython is a Python library providing support for interprocess communication between Python and kdb+ processes, it offers:Synchronous and asynchronous queriesConvenient asynchronous callbacks mechanismSupport for kdb+ protocol and types as of kdb+ v4.0Uncompression of the IPC data streamInternal representation of data via numpy arrays (lists, complex types) and numpy data types (atoms)Supported on Python 3.4/3.5/3.6 and numpy 1.8+For more details please refer to thedocumentation_.InstallationTo install qPython from PyPI:$ pip install qpython3Please do not use old PyPI package name: qpython or exxeleron-qpython.To install qPython from internal PyPI:``$ pip install --trusted-host pypi.dts.corp.local --extra-index-urlhttps://pypi.dts.corp.local/root/citizen/+simple/qpythonBuilding package``$ python setup.py sdist bdist_wheelDocumentationqPython documentation is generated with help of `Sphinx`_ document generator.
In order to build the documentation, including the API docs, execute:
``make html`` from the doc directory.

Documentation is built into the: ``doc/build/html/`` directory.


Compile Cython extensionsqPython utilizesCython_ to tune performance critical parts of the code.Instructions:Execute:python setup.py build_ext --inplaceBuild binary distributionInstructions:

- Execute: ``python setup.py bdist``


Testing
~~~~~~~

qPython uses py.test as a test runner for unit tests.

Instructions:

- Make sure that top directory is included in the ``PYTHONPATH``
- Execute: ``py.test``


CVE Scanning
~~~~~~~~~~~~

Configured GitHub Action as per the "Python" section of:

- https://github.com/maoo/security-scanning


Requirements
~~~~~~~~~~~~

qPython requires numpy 1.8 to run.

Optional requirements have to be met to provide additional features:

- tune performance of critical parts of the code:

  - Cython 0.20.1

- support serialization/deserialization of ``pandas.Series`` and ``pandas.DataFrame``

  - pandas 0.14.0

- run Twisted sample:

  - Twisted 13.2.0

- build documentation via Sphinx:

  - Sphinx 1.2.3
  - mock 1.0.1

Required libraries can be installed using `pip`_.

To install all the required dependencies, execute:
``pip install -r requirements.txt``

Minimal set of required dependencies can be installed by executing:
``pip install -r requirements-minimal.txt``

.. _Cython: http://cython.org/
.. _Sphinx: http://sphinx-doc.org/
.. _pip: http://pypi.python.org/pypi/pip
.. _documentation: http://qpython.readthedocs.org/en/latest/
Package: python-keycloak
Python Keycloakpython-keycloakis a Python package providing access to the Keycloak API.InstallationInstall via PyPI:$ pip install python-keycloakBug reportsPlease report bugs and feature requests athttps://github.com/marcospereirampj/python-keycloak/issuesDocumentationThe documentation for python-keycloak is available onreadthedocs.Example of Using Keycloak OpenIDfromkeycloakimportKeycloakOpenID# Configure clientkeycloak_openid=KeycloakOpenID(server_url="http://localhost:8080/auth/",client_id="example_client",realm_name="example_realm",client_secret_key="secret")# Get WellKnownconfig_well_known=keycloak_openid.well_known()# Get Code With Oauth Authorization Requestauth_url=keycloak_openid.auth_url(redirect_uri="your_call_back_url",scope="email",state="your_state_info")# Get Access Token With Codeaccess_token=keycloak_openid.token(grant_type='authorization_code',code='the_code_you_get_from_auth_url_callback',redirect_uri="your_call_back_url")# Get Tokentoken=keycloak_openid.token("user","password")token=keycloak_openid.token("user","password",totp="012345")# Get token using Token Exchangetoken=keycloak_openid.exchange_token(token['access_token'],"my_client","other_client","some_user")# Get Userinfouserinfo=keycloak_openid.userinfo(token['access_token'])# Refresh tokentoken=keycloak_openid.refresh_token(token['refresh_token'])# Logoutkeycloak_openid.logout(token['refresh_token'])Example of Using Keycloak Admin APIfromkeycloakimportKeycloakAdminfromkeycloakimportKeycloakOpenIDConnectionkeycloak_connection=KeycloakOpenIDConnection(server_url="http://localhost:8080/",username='example-admin',password='secret',realm_name="master",user_realm_name="only_if_other_realm_than_master",client_id="my_client",client_secret_key="client-secret",verify=True)keycloak_admin=KeycloakAdmin(connection=keycloak_connection)# Add usernew_user=keycloak_admin.create_user({"email":"example@example.com","username":"example@example.com","enabled":True,"firstName":"Example","lastName":"Example"})# Add user and raise exception if username already exists# exist_ok currently defaults to True for backwards compatibility reasonsnew_user=keycloak_admin.create_user({"email":"example@example.com","username":"example@example.com","enabled":True,"firstName":"Example","lastName":"Example"},exist_ok=False)# Add user and set passwordnew_user=keycloak_admin.create_user({"email":"example@example.com","username":"example@example.com","enabled":True,"firstName":"Example","lastName":"Example","credentials":[{"value":"secret","type":"password",}]})For more details, see the documentation available onreadthedocs.
Package: python-keycloak-api-client
Python Keycloak ClientUsagefromkeycloak_api_clientimportKeycloakApiClientkeycloak_api_client=KeycloakApiClient(...)read_keycloak_user=keycloak_api_client.get_keycloak_user_by_email('johndoe@example.com')Test$toxDevelopment$pipinstall-e.Changelogv0.8.1Clearadmin_user_access_tokenbefore using token-exchange feature.v0.8.0Allow to define startingclient_id/client_secretwhen using token-exchange featurev0.7.1Changeclient_idvalue inget_user_tokensv0.7.0Added methodssearch_clients_by_client_idanddelete_clientAddedKeycloakClientdataclassv0.6.0Added methodscreate_clientandcreate_mapper_for_clientv0.5.0Added methodsend_verification_emailv0.4.0Added methodreset_passwordv0.3.0Added methodcount_usersv0.2.2Addedlimitandoffsetparams inKeycloakApiClient.search_users()to control pagingv0.2.1FixedStopIterationwhen downloading user by email in case email partially matches found users but not exact match exact emailv0.2.0Methodget_keycloak_userwas replaced byget_keycloak_user_by_idandget_keycloak_user_by_emailv0.1.1Fixed typov0.1.0Initial release
Package: python-keycloak-client
Python Client for Keycloak identity and access management serviceDocumentationhttp://www.keycloak.org/https://github.com/Peter-Slump/python-keycloak-clientDevelopmentInstall development environment:$makeinstall-pythonWriting docsDocumentation is written using Sphinx and maintained in the docs folder.To make it easy to write docs Docker support is available.First build the Docker container:$dockerbuild.-fDockerfileDocs-tpython-keycloak-client-docsRun the container$dockerrun-v`pwd`:/src--rm-t-i-p8050:8050python-keycloak-client-docsGo in the browser tohttp://localhost:8050and view the documentation which get
refreshed and updated on every update in the documentation source.Create release$gitcheckoutmaster$gitpull--Updatereleasenotes--$bumpversionrelease$makedeploy-pypi$bumpversion--no-tagpatch$gitpushoriginmaster--tagsRelease Notesunreleasedv0.2.3Bug fix:client_classonKeycloakRealmconstructor (thanks topcaro)Improve Keycloak Client (thanks toByJacob)add delete in admin clientadd manage groups in realmadd manage user rolesrename Roles to ClientRolesv0.2.2Added support for UMA1 for Keycloak < 4.0Allow to query registered users (thanks toaberres)v0.2.1Including aio version in released package. (thanks tomackeyja92)v0.2.0Added async client based on aiohttp (thanks tonkoshell)v0.1.4Add support for password grant (thanks toscranen)Bugfix: Prevent multiple values for keyword argument ‘audience’ in jwt.decode() (thanks toeugenejo)
Package: python-keycloak-plus
[![Documentation Status](https://readthedocs.org/projects/python-keycloak/badge/?version=latest)](http://python-keycloak.readthedocs.io/en/latest/?badge=latest)Python Keycloak PlusFor review- seehttps://bitbucket.org/umedef/python-keycloak-pluspython-keycloak-plusis a Python package providing access to the Keycloak API. Based onhttps://bitbucket.org/agriness/python-keycloakpackage## Installation### Via Pypi Package:` $ pip installpython-keycloak-plus`### Manually` $ python setup.py install `## Dependenciespython-keycloak depends on:Python 3[requests](http://docs.python-requests.org/en/master/)[python-jose](http://python-jose.readthedocs.io/en/latest/)### Tests Dependenciesunittest[httmock](https://github.com/patrys/httmock)## Bug reportsPlease report bugs and feature requests athttps://bitbucket.org/agriness/python-keycloak/issues## DocumentationThe documentation for python-keycloak is available on [readthedocs](http://python-keycloak.readthedocs.io).## Contributors[UmeDef](https://bitbucket.org/umedef/)## UsageSee readmehttps://bitbucket.org/agriness/python-keycloak.
Package: python-keyczar
Keyczar is an open source cryptographic toolkit designed to make it easier and safer for developers to use cryptography in their applications. Keyczar supports authentication and encryption with both symmetric and asymmetric keys. Some features of Keyczar include:A simple API
Key rotation and versioning
Safe default algorithms, modes, and key lengths
Automated generation of initialization vectors and ciphertext signatures
Java and Python implementations (C++ coming soon)
International support in Java (Python coming soon)
Keyczar was originally developed by members of the Google Security Team and is released under an Apache 2.0 license.
Package: python-keygen
Key GeneratorInstallationpip3 install python-keygenUsageTo Generate Keyfrom keygen import KeyGen
keygen = KeyGen()
keygen.gen_key(length=20)To Validate A Keyfrom keygen import KeyGen
keygen = KeyGen()
key = input("Enter Your Key: ")
is_valid = keygen.validate(key) # return true if key is valid else false
if is_valid:
    print("Valid Key")
else:
    print("Not Valid Key")
Package: python-keystoneclient
Python bindings to the OpenStack Identity API (Keystone)This is a client for the OpenStack Identity API, implemented by the Keystone
team; it contains a Python API (thekeystoneclientmodule) for
OpenStack’s Identity Service. For command line interface support, useOpenStackClient.PyPi- package installationOnline DocumentationLaunchpad project- release managementBlueprints- feature specificationsBugs- issue trackingSourceSpecsHow to ContributeRelease NotesContents:Python APIPython APIBy way of a quick-start:>>> from keystoneauth1.identity import v3
>>> from keystoneauth1 import session
>>> from keystoneclient.v3 import client
>>> auth = v3.Password(auth_url="http://example.com:5000/v3", username="admin",
...                     password="password", project_name="admin",
...                     user_domain_id="default", project_domain_id="default")
>>> sess = session.Session(auth=auth)
>>> keystone = client.Client(session=sess)
>>> keystone.projects.list()
    [...]
>>> project = keystone.projects.create(name="test", description="My new Project!", domain="default", enabled=True)
>>> project.delete()
Package: python-keystoneclient-federation
===============================python-keystoneclient-federation===============================Federation plugins and helpers for the OpenStack clients.* Free software: Apache license* Documentation: http://docs.openstack.org/developer/python-keystoneclient-federation* Source: http://git.openstack.org/cgit/openstack/python-keystoneclient-federation* Bugs: http://bugs.launchpad.net/python-keystoneclientFeatures--------* TODO
Package: python-keystoneclient-kerberos
python-keystoneclient-kerberos was an authentication plugin for keystoneclient
that supported Kerberos. The contents have been moved into the keystoneauth1
package athttps://pypi.python.org/pypi/keystoneauth1/, and
python-keystoneclient-kerberos will no longer be supported.Free software: Apache licenseDocumentation:http://docs.openstack.org/developer/python-keystoneclient-kerberosSource:http://git.openstack.org/cgit/openstack/python-keystoneclient-kerberosBugs:http://bugs.launchpad.net/python-keystoneclient