Saravanan666/pypi-org huggingface dataset:
Package: ohoh
OhOh is a debugger for your WSGI applications. Using OhOh, you can inspect
the stack frames of a wsgi app that’s thrown an exception.UsageUse this command to serve your wsgi app in debug mode:> ohoh "package.module:wsgi_app" -s localost:5000For a full range of options, seeohoh-hOhOh provides a plug-in for thehttpieutility. You can installhttpieusingpip install httpie. Once you send a request that results in an
exception, you will enter the debugger automatically:> http localhost:5000
HTTP/1.0 500 Internal Server Error
Date: Fri, 24 Jul 2015 23:41:20 GMT
Server: WSGIServer/0.2 CPython/3.4.2
Content-Type: text/plain; charset=utf-8
OhOh-Debug-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1N [Truncated (5061 chars) ...]
Location: http://localhost:5000/ohoh-debug/
Content-Length: 454

Traceback (most recent call last):
  File "c:\dev\ohoh\build\lib\ohoh\middleware.py", line 57, in __call__
    return self._app(environ, start_response)
  File "tests\mock_app.py", line 6, in simple_err_app
    path.join("foo bar", 475564)
  File "C:\Python34\lib\ntpath.py", line 110, in join
    p_drive, p_path = splitdrive(p)
  File "C:\Python34\lib\ntpath.py", line 159, in splitdrive
    if len(p) > 1:
TypeError: object of type 'int' has no len()
OhOh Interactive Debugger v0.1.dev28+n8ec9121
(odb) up
> c:\python34\lib\ntpath.py(110)join()
-> p_drive, p_path = splitdrive(p)
(odb)CommandsThe following commands are supported by the command interpreter
(you can typehelpat the debugger prompt for online help with commands):CommandDescriptionClient commandsquitExit the debugger.tokenView the current debug server token.urlView or set the url to which debug requests are sent.versionView the version number of the debugger.Debug commands!Execute a one-line statement in the current context.argsPrint the argument list to the current function.pPrint the value of an expression.ppPretty print the value of an expression.wherePrint the stack trace, with the most recent call last.upMove up one frame in the stack.downMove down one frame in the stack.
Package: oh-sanitizer
Opening hours sanitizer - A corrector for the 'opening_hours' fields=========================================================================If you work with the `opening_hours` fields in OpenStreetMap, you probably need to check somewhere if a field is valid before to parse it, or to do anything with it.Of course, for simple formats, can do this with regexes, but [specifications](https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification) are so rich that a full regex to handle them is quite impossible.This is the goal of this tiny module: check if an `opening_hours` field is valid, and try to correct it if it isn't.In addition to the simple formats, like `Mo-Fr 10:00-20:00`, it can parse and fix almost all shapes of opening hours.Here is what it can do.```python>>> from oh_sanitizer import sanitize_field>>> print(sanitize_field("mo-fr 10h - 19h00"))"Mo-Fr 10:00-19:00">>> print(sanitize_field("2010 - 2020/2 dec-feb 10:00 am - 12:00 am/1:00 pm-7:00pm"))"2010-2020/2 Dec-Feb 10:00-12:00,13:00-19:00"```**It works both with Python 2 and 3.**It is so small that you can include it directly into your projet.You can also install it with PyPi:$ pip install oh-sanitizerThe `sanitize_field()` function can raise the following exceptions:- `TypeError` : If the given field is not a string.- `SanitizeError` : The generic exception of `oh_sanitizer`,raised when the field can't be parsed (if it is too complex,or "too much invalid").- `InconsistentField` : Inheriting from `SanitizeError`,raised when the field contains an invalid pattern which can'tbe corrected automatically.So, you can simple do this.```pythonfrom oh_sanitizer import sanitize_field, SanitizeErrorfield = "mo-fr 10h - 19h00"try:sanitized_field = sanitize_field(field)print("Here is the sanitized field:", sanitized_field)except SanitizeError:print("So bad, the field could not be sanitized.")```If you want to parse `opening_hours` fields to know, for example, whether a facility is open, OH Sanitizer is NOT what you need.See the [Humanized Opening Hours](https://github.com/rezemika/humanized_opening_hours) module or its [alternatives](https://github.com/rezemika/humanized_opening_hours#alternatives).
Package: ohsgpgn
This ohsgpgn is very simple but a good password generator. The generated password includes at least one number,one ascii,one capatalized ascii and one special chars(‘!@$%^&*()+’).With (n) argument, length of password can be set. If the argument(n) is  less than 10(n < 10), the generated password length will be at least 10.#!/usr/bin/env python3from ohsgpgn import ohsgpgnprint(ohsgpgn.genGoodpass(20))oyj@shell_prompt$ python3 pass.pyzB!2X3!d*V#V!EwOnEK6#Using python shell(example)Python 3.6.9 (default, Apr 18 2020, 01:56:04)[GCC 8.4.0] on linuxType “help”, “copyright”, “credits” or “license” for more information.>>> from ohsgpgn import ohsgpgn
>>> ohsgpgn.genGoodpass(3)
'&92DLE1Kf&'
>>> ohsgpgn.genGoodpass(20)
'ae5s67NN4H04bJt$Aajd'
>>> ohsgpgn.genGoodpass(100)
'IN5SATQaVW8E9JL)Q5K2oIJ02Ep5@YVMQ6CAY6LAXPIKDu*COCKGC0Y8EM2Q1VSCEE286XZT2Q8yMDX9JH8OYRXB7YHUPO0D2IDZ'
Package: ohsnap
This package contains apyCLIapplication that managestarsnapbackups and
retention policies.Theohsnapcommandohsnapwill allow a user to create backups with retention policies.UsageBasic usage info is display when runningohsnapwith no arguments.$ ohsnapusage: ohsnap [-b BINARY] {backup,list,purge}
ohsnap: error: too few argumentsCombining-hor--helpwith any subcommand will provide more detailed
info.$ ohsnap -h backupusage: backup [-h] [-l LOGFILE] [-q] [-s] [-v] [-C CWD] [-n NAME][-r RETENTION]
[path [path …]]positional arguments:path                  paths to backupoptional arguments:-h,--helpshow this help message and exit-lLOGFILE,--logfileLOGFILElog to file (default: log to stdout)-q,--quietdecrease the verbosity-s,--silentonly log warnings-v,--verboseraise the verbosity-CCWD,--cwdCWDdirectory to run the backup from-nNAME,--nameNAMEarchive name-rRETENTION,--retentionRETENTIONinteger and time identifier e.g. 1h, 3d, 6yExampleTo backup the spam and eggs directories with 1 day retention:$ ohsnap backup –retention 1d –name spam-eggs spam eggsTo list existing archives created by the ohsnap manager:$ ohsnap listTo purge archives that have outlived their retention policy:$ ohsnap purge
Package: ohsome2label
ohsome2labelHistorical OpenStreetMap Objects to Machine Learning Training SamplesTheohsome2labeloffers a flexible label preparation tool for satellite machine learning applications.Customized Object- user-defined geospatial objects are retrieved and extracted from OpenStreetMap full-history data by requestingohsomeweb API.Various Satellite Images- user could downloads corresponding satellite imagery tiles from different data providers.Seamless Training- object labels together with images would be packaged and converted toMicrosoft COCO.json format to provide a seamleass connection to further model training.The output package could support directly training of popular machine learning tasks (e.g., object detection, semantic segmentation, instance segmentation etc,).Package Dependenciespython 3.6Installationpip install ohsome2labelAcknowledgementsThe package relies heavily on theOpenStreetMap History Data Analysis Frameworkunder theohsomeAPI. The idea of this package has been inspired by the excellent work oflabel-maker. Last but not lease, we would like to thanks for the contributions of OpenStreetMap volunteer to make this happen.OpenStreetMap historical data is licensed under theODbLby theOpenStreetMap Foundation(OSMF).
Package: oi
python library for writing long running processes with a cli interfaceoi imageInstallNote: You neednanomsginstalled on your system:$gitclonegit@github.com:nanomsg/nanomsg.git$cdnanomsg$./configure$make$makecheck$sudomakeinstallThen install oi$pipinstalloiUsage1. Write your long running program# programd.pyimportoiprogram=oi.Program('my program','ipc:///tmp/program.sock')program.add_command('ping',lambda:'pong')program.add_command('state',lambda:program.state)program.run()# program will run forever2. Add a ctl interface# programctl.pyimportoictl=oi.CtlProgram('ctl program',address='ipc:///tmp/program.sock')ctl.run()3. Run program, then connect to it via ctl# Run process$pythonprogramd# OR with a configuration file$pythonprogramd--config/etc/program.conf$pythonprogramctl# enter ctl loopprogramctl>pingpong# OR ping end exit$pythonprogramctlpingQuickly get started with a new project$mkdirxprogram$cdxprogram$oiinit$makeinstall# Start your program$xprogramd# Start ctl program$xprogramctlctl>pingpong# Upload to pypi (Edit setup.py before distributing)$makedistributeNow the interesting bit. Are you ready?Run your program on one computer, then control it from another with a
single line change (actually two).Just change the addressipc:///tmp/program.sockto a tcp address,
such astcp://192.168.1.100:5000in both yourprogramd.pyandprogramctl.py. That’s it! (:TODO[ ] Add more testingLicenseMIT License
Package: oic
A Python OpenID Connect implementationThis is a complete implementation of OpenID Connect as specified in theOpenID
Connect Core specification. And as a side effect, a complete implementation
of OAuth2.0 too.Please see theCHANGELOG.mdto review the latest changes.DocumentationThedocumentationis graciously hosted byRead the Docs. Unfortunately,
the documentation has been largely left unmaintained andthere are various
issues. However, the maintainers are trying to remedy this lately with some
new momentum. Please help us by submitting pull requests if you can help
improve the documentation.ExamplesUnfortunately, the current examples included in this repository are
unmaintained andthere are many issues. We’re currently in the process of
creating a working canonical example implementation, however, until that time,
the current examples largely do not work. Please help us by submitting pull
requests that may bring these examples back into a working condition if you
get something working locally.AcknowledgementsCudos to Vladislav Mladenov and Christian Mainka both at
Horst Görtz Institute for IT-Security, Ruhr-University Bochum, Germany
for helping me making the implementation more secure.Maintainers NeededIf you’re interested in helping maintain and improve this package, we’re
looking for you! We’re working on the project on a best effort basis but we
still maintain a good flow of reviewing each others pull requests and driving
discussions on what should be done.Please contact one of the current maintainers@rohe,@tpazderkaor@schlenk.ContributeFork the repository, clone your copy andinstall pipenv.Then just run:$makeinstallNext, running the tests:$maketestThis will not affect your system level Python installation. Please reviewour
issuesto see what needs working on. Do not hesitate to ask questions if
something is unclear. We mark easy issues asnewcomer-friendly, so they are
a good place to start if you want to contribute.WindowsIf you happen to work in a Windows environment, the above will not work out of the box due to the lack
of aGNU Makeon Windows. In addition one of the dependencies forldap_authnis not available as a prebuilt
wheel from pypi, so use these slightly modified instructions.Withpipenvin your path you run:pipenv install --dev -e .[develop,testing,docs,quality]Next you can run the tests:pipenv run pytest tests
Package: oicli
This small python package implements a simple object-oriented layer on top of python’sargparse,
offering a more intuitive and easier way to build command-line interfaces.Quick StartInstalling Oi package.pipinstalloicliUsage exampleGiven the commands bellow:$myappuserlist$myappuseradd--nameWilson--emailwilson@codeminus.orgThe parser would look like this:importoiapp=oi.App('myapp')user_cmd=oi.Command(app,'user')user_list_cmd=oi.Command(user_cmd,'list')user_add_cmd=oi.Command(user_cmd,'add')user_add_cmd.add_argument('--name')user_add_cmd.add_argument('--email')print(app.parse_args())Running the application with the code above:$myappuserNamespace(command='user')$myappuserlistNamespace(command='user_list')$myappuseradd--nameWilson--emailwilson@codeminus.orgNamespace(command='user_add',email='wilson@codeminus.org',name='Wilson')Notice thecommandattribute of the Namespace.
It correspond to the name of the command invoked.
The sub-command name is appended to its parent command to ensure a unique identifier is created.What does “Oi” mean? Well… What does it mean to you? Try thewiki.
Package: oida
💅OidaOida is Oda's linter that enforces code style and modularization in our
  Django projects.WarningThis project is still in early development. Expect breaking changes.InstallationOida requires Python 3.10 or newer and can be installed fromPyPI:pip install oidaUsageOida is mainly intended to be used as aflake8plugin. Once you have installed Oida and flake8 you can enable the linting
rules in the flake8 config:[flake8]extend-select=ODAThis will enable all our linting rules. You can also enable them one by one,
for a complete list of the various violations we report on see theoida/checkers/base.pyfile.Oida also provides its own command line tool. This can also be used to run the
linting rules, but its main purpose is to provide tools to help transitioning
an existing codebase into one that's modularized. For details seeoida --help, but below is a quick summary of the provided commands:oida lintThis command is just another way of running the same checks that can be run
throughflake8. Note that this does not support# noqacomments.oida configThis command will generate configuration files for components, which will be
automatically pre-filled with ignore rules for isolation violations. See below
for details on the configuration files.oida componentizeThis command moves or renames a Django app, for example for moving an app into
a component. In addition to moving the files in the app it also updates (or
adds if needed) the app config and updates imports elsewhere in the project.ConceptsOida is a static code analyzer, that also looks at the project structure. The
codebase is expected to be structured with a project as the top package and
then Django apps orcomponentsas submodules below this, something like this:project/
├── pyproject.toml
├── setup.cfg
└── project/
    ├── __init__.py
    ├── my_component/
    │   ├── __init__.py
    │   ├── first_app/
    │   │   ├── __init__.py
    │   │   ├── models.py
    │   │   └── ...
    │   ├── second_app/
    │   │   ├── __init__.py
    │   │   └── ....
    │   └── ...
    ├── third_app/
    │   ├── __init__.py
    │   └── ...
    └── ...A component is basically a collection of Django apps. Oida will enforce
isolation of the apps inside the component, meaning that no code elsewhere in
the project will be allowed to import from the apps inside a component. Instead
a component should expose a public interface at the top level.Because Oida is intended to be introduced in mature projects it's also possible
to grandfather in existing violations. That's done through aconfcomponent.pyfile placed at the root of the component. The only allowed statement in this
file is assigning a list of string literals toALLOWED_IMPORTS:ALLOWED_IMPORTS=["my_component.app.models.MyModel"]This will silence any warnings when importingmy_component.app.models.MyModelin the current app/component.ChecksThese are the checks currently implemented in Oida:component-isolation:Checks that relative imports do not cross app boundaries.config:Checks that component configuration files are validrelative-imports:Checks that no imports are done across components.
Package: oidc-client
OIDC ClientA pure-Python OpenID Connect client supporting OAuth 2.1 authorization flows, built for Python 3.10+ with minimal dependencies.OAuth 2.1 authorization flows include:theauthorization codeflow, for interactive user login;theclient credentialsflow, for confidential machine-to-machine communication.This OIDC Client supports reading configuration profiles from apyproject.tomlfile.RequirementsPython 3.10+Installationpip install oidc-clientConfigurationTo enable interactive login for your project, add the following to yourpyproject.toml:[tool.oidc]issuer="https://example.com"# URL of your OIDC providerclient_id="<application ID>"# Application ID given by your OIDC providerExamples#Tolog-inasauser,usingawebbrowser:oidc login --interactiveLicenseThis project is licensed under the terms of the MIT license.AYZRFree and Open Source project.
Package: oidc-hub
OpenID Connect HubTheoidc_hubpackage provides a user-friendly web interface for managing OpenID identities. As an Identity Provider (IdP), this Django project allows users to manage their OpenID credentials and authenticate with these seamlessly.FeaturesUser-Friendly Interface: A clean and intuitive web interface for users to manage their OpenID identities effortlessly.OpenID Authentication: Serve as an OpenID Identity Provider, enabling users to utilize their OpenID credentials for authentication across various services.Identity Management: Users can create, update, and delete OpenID identities easily through the web interface.Security: Implement secure OpenID authentication practices to ensure the safety and privacy of user identities.Installationpipinstalloidc-hubConfigurationAddoidc_hubandoidc_providerto yourINSTALLED_APPSin the Django project's settings:INSTALLED_APPS=[# ..."oidc_provider","oidc_hub",# ...]MigrationsRun migrations to create the required database tables:python3manage.pymigrateThe first time you migrate, an administrator account will be created according to the settings you have specified in a settings module.The initial migration will useADMIN_USERNAME,ADMIN_EMAILandADMIN_PASSWORDsettings or their default values if these settings are not specified.WebserverDevelopmentStart the Django development server.python3manage.pyrunserverLicenseThis project is licensed under the AGPLv3 License - see theLICENSE.mdfile for details.
Package: oidcish
oidcish"Oh I Don't Care If Something Happens""OIDC Is Definitely Cool If Someone Helps"What?Library to connect to your OIDC provider via:Authentication code flowDevice code flowClient credentials flowUsage>>>fromoidcishimportDeviceFlow,CodeFlow,CredentialsFlow>>>auth=DeviceFlow(...host="https://idp.example.com",...client_id=...,...client_secret=...,...scope=...,...audience=......)Visithttps://idp.example.com/device?userCode=594658190tocompletesign-in.# Or use env file for auth# auth = DeviceFlow(_env_file="path/to/my/env.file")# Or use authorization code flow# auth = CodeFlow(_env_file="path/to/my/env.file")# Or use client credentials flow# auth = CredentialsFlow(_env_file="path/to/my/env.file")>>>print(auth.credentials.access_token)eyJhbGciOiJSU...OptionsDevice flow can be used with the following options:OptionEnvironment variableDefaultDescriptionhostOIDCISH_HOSTNo defaultThe address to the IDP server.client_idOIDCISH_CLIENT_IDNo defaultThe client id.client_secretOIDCISH_CLIENT_SECRETNo defaultThe client secret.scopeOIDCISH_SCOPEopenid profile offline_accessA space separated, case-sensitive list of scopes.audienceOIDCISH_AUDIENCENo defaultThe access claim was designated for this audience.The OIDCISH_ prefix can be set with the OIDCISH_ENV_PREFIX environment variable.Code flow can be used with the following options:OptionEnvironment variableDefaultDescriptionhostOIDCISH_HOSTNo defaultThe address to the IDP server.client_idOIDCISH_CLIENT_IDNo defaultThe client id.client_secretOIDCISH_CLIENT_SECRETNo defaultThe client secret.redirect_uriOIDCISH_REDIRECT_URIhttp://localhostMust exactly match one of the allowed redirect URIs for the client.usernameOIDCISH_USERNAMENo defaultThe user name.passwordOIDCISH_PASSWORDNo defaultThe user password.scopeOIDCISH_SCOPEopenid profile offline_accessA space separated, case-sensitive list of scopes.audienceOIDCISH_AUDIENCENo defaultThe access claim was designated for this audience.The OIDCISH_ prefix can be set with the OIDCISH_ENV_PREFIX environment variable.Client credentials flow can be used with the following options:OptionEnvironment variableDefaultDescriptionhostOIDCISH_HOSTNo defaultThe address to the IDP server.client_idOIDCISH_CLIENT_IDNo defaultThe client id.client_secretOIDCISH_CLIENT_SECRETNo defaultThe client secret.audienceOIDCISH_AUDIENCENo defaultThe access claim was designated for this audience.The OIDCISH_ prefix can be set with the OIDCISH_ENV_PREFIX environment variable.
Package: oidcmsg
oidcmsgImplementation of OIDC protocol messages.oidcmsg is the 2nd layer in the
JwtConnect stack (cryptojwt, oidcmsg, oidcservice, oidcrp)Handles serialising into a couple of formats (jwt, json, urlencoded and dict) and deserialising from said formats.It also does verification of messages , that is :verifies that all the required parameters are present and has a valueverifies that the parameter values are of the right typeverifies that if there is a list of permitted values, a parameter value is on
that list.and finally if the value is a signed and/or encrypted JWT this package
will perform the necessary decryption and signature verification.Also implements aKeyJarwhich keeps keys belonging to
different owners. One owner may have many keys.
If some of these keys have a common origin, like described in a JWKS.
Such a set will be kept in akeyBundle.
Also implemented in this package.Please read theOfficial Documentationfor getting usage examples and further informations.
Package: oidcop
oidc-opThis project is a Python implementation of anOIDC Provideron top ofjwtconnect.iothat shows to you how to 'build' an OP using the classes and functions provided by oidc-op.If you want to add or replace functionality the official documentation should be able to tell you how.
If you are just going to build a standard OP you only have to understand how to write your configuration file.
Inexample/folder you'll find some complete examples based on flask and django.Idpy OIDC-op implements the following standards:OpenID Connect Core 1.0 incorporating errata set 1Web FingerOpenID Connect Discovery 1.0 incorporating errata set 1OpenID Connect Dynamic Client Registration 1.0 incorporating errata set 1OpenID Connect Session Management 1.0OpenID Connect Back-Channel Logout 1.0OpenID Connect Front-Channel Logout 1.0OAuth2 Token introspectionIt also comes with the followingadd_onmodules.Custom scopes, that extendsOIDC standard ScopeClaimsProof Key for Code Exchange by OAuth Public Clients (PKCE)OAuth2 PAROAuth2 RAROAuth2 DPoPOAuth 2.0 Authorization Server Issuer IdentificationThe entire project code is open sourced and therefore licensed under theApache 2.0For any futher information please read theOfficial Documentation.CertificationsContributeJoin in.AuthorsRoland Hedberg