Saravanan666/pypi-org huggingface dataset:
Package: python-connect4
Connect4Documentation:https://nekeal.github.io/connect4Source Code:https://github.com/nekeal/connect4PyPI:https://pypi.org/project/connect4/Multiplayer implementation of "connect four" gameInstallationpipinstallconnect4DevelopmentClone this repositoryRequirements:PoetryPython 3.7+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-filesThis project was generated using thewolt-python-package-cookiecuttertemplate.
Package: python-connpass
connpass APIINSTALL$ pip install python-connpassor$ easy_install python-connpassAPINow, connpass has one API.event searchhttp://connpass.com/api/v1/event/example:connpass = Connpass()
results = connpass.search(event_id=[364])Commandusage: connpass [-h] [--event-id [EVENT_ID [EVENT_ID ...]]]
                [--keyword [KEYWORD [KEYWORD ...]]]
                [--keyword-or [KEYWORD_OR [KEYWORD_OR ...]]]
                [--ym [YM [YM ...]]] [--ymd [YMD [YMD ...]]]
                [--nickname [NICKNAME [NICKNAME ...]]]
                [--owner-nickname [OWNER_NICKNAME [OWNER_NICKNAME ...]]]
                [--series-id [SERIES_ID [SERIES_ID ...]]] [--start START]
                [--count COUNT] [--format {json}]

optional arguments:
  -h, --help            show this help message and exit
  --event-id [EVENT_ID [EVENT_ID ...]]
  --keyword [KEYWORD [KEYWORD ...]]
  --keyword-or [KEYWORD_OR [KEYWORD_OR ...]]
  --ym [YM [YM ...]]
  --ymd [YMD [YMD ...]]
  --nickname [NICKNAME [NICKNAME ...]]
  --owner-nickname [OWNER_NICKNAME [OWNER_NICKNAME ...]]
  --series-id [SERIES_ID [SERIES_ID ...]]
  --start START
  --count COUNT
  --format {json}CHANGES0.1 (2013-03-20)first release
Package: pythonConsoleConfigs
Python Console ConfigurationPython Console Configuration is a Python library for customization the output of terminal by color, style and highlight. Also, can have loadings.InstallationUse the package managerpipto install Python Console Configuration.pipinstallpythonConsoleConfigUsage FontfrompythonConsoleConfigs.FontimportColor,Style,Highlight# prints magentaprint(f'{Color.MAGENTA}{"This is a test of Python Console Configuration Library"}')# prints blinkprint(f'{Style.BLINK}{"This is a test of Python Console Configuration Library"}')# prints highlight blueprint(f'{Highlight.BLUE}{"This is a test of Python Console Configuration Library"}')# Reset all configurationStyle().reset()# And so many others ...Available ConfigurationsColors, Highlights (+ LIGHT)BLACKREDGREENYELLOWBLUEMAGENTACYANWHITEGREYStylesBOLDITALICURLBLINKBLINK2SELECTEDUsage LoadingfrompythonConsoleConfigs.FontimportColorfrompythonConsoleConfigs.LoadingimportBox,Percentage# Boxes loading like: ■■■□□□□□□□Box(duration=1,size=15,color=Color.BLUE,reverse=True).loading()# Percentages like: 20%Percentage(duration=1,rate=10,color=Color.RED).loading()Available LoadingBoxesNormal   (■■■□□□□□□□)Reversed (□□□□□□□■■■)Duration (seconds)Number of boxesColorPercentagesDuration (seconds)Rate (by 5%, 10% etc.)ColorContactContact me usingdiscordfor support or requests.GregoryStefanos#1048LicenseApache License 2.0
Package: python-console-explorer
CLI_ExplorerA Python lib that enables you to load a command-line file explorer for your users !This lib allows you to ask the user to look for a specific file, folder, or a location in which to save a file !The lib also comes with a built-in duplicate system, which lets you or the user choose what to do if a file with the same filename already exists, and much more features !InstallInstall from PyPITo install the library, just typepip install python-console-explorerand this should be ok.VisitPyPIfor more info.Install from sourceJust download the file atthis link, and import it in your project.UsageSeeexamplesif wanted.The library gives access to two functions. The first allows to browse for a file, the second for a folder.Thebrowse_for_filefunctionThis function will return the path to a file. This file might be non-existent, if the parameterexistence_requiredis set to False (default).Parameters :path: The default path in which the explorer will be opened.existence_required: Boolean indicating whether or not the file should already exist.handle_same_file: Boolean indicating whether or not to warn the user if the file he selected already exists.AutomaticallyFalseif existence_required is True.enable_commands: Boolean indicating whether or not commands (MKDIR/RMDIR) are enabled.extensions_list: A tuple of extensions the user can open. By default, any.cancel_enabled: Boolean indicating if the CANCEL command should be enabled or not.Thebrowse_for_folderfunctionThis function will return the path to a folder.Parameters :path: The default path in which the explorer will be opened.enable_commands: Boolean indicating whether or not commands (MKDIR/RMDIR) are enabled.cancel_enabled: Boolean indicating if the CANCEL command should be enabled or not.ExampleCreating a basic text editor.This program is a text editor, the user will input each line, one by one, then typeEXITwhen he's finished.Afterwards, he will look for a place to save the file.File available on GitHubfromconsole_explorerimport*# Creating the two required variablestext=""# The file's textuser_input=""# The user input (just initialized, here)# Looping until the user types 'EXIT'whileuser_input!="EXIT":# Asking him a lineuser_input=input("")# If the line is not 'EXIT' (which would mean we are done writing the text), we add the# inputted line to the textifnotuser_input=="EXIT":text+=user_input+"\n"# We ask the user to choose the file destination.# Also, we only want it to be a plain text (.txt) file or Markdown file (.md)file_to_save_in=browse_for_file(extensions_list=("txt","md"))# If the user cancelled the save, we simply passiffile_to_save_inisNone:pass# Otherwise, we open the file he selected, and we put the text inside.else:withopen(file_to_save_in,"w")asfile:file.write(text[:-1])
Package: python-console-menu
Python Console MenuThis library provides a way to quickly create the menu for your Python console app.OverviewClassesAbstractMenuThis is the abstract class you need to extend in your menus.
Its constructor takes in a title which is displayed at the top of the menu. This should be called from your implementation's constructor. Like so:class MenuImplementation(AbstractMenu):
    def __init__(self):
        super().__init__("Menu Title")Methodsinitialise()this needs overriding in your implementations and is where you add the items to the menu.display()this starts this menu. This only needs to be called on the root menu in your system, as all sub-menus are handled by this library.add_menu_item(MenuItem(id, description, subMenu or action))this adds an item to the menu.add_hidden_menu_item(new MenuItem(id, description, subMenu or action))this is a helper method that adds a menu item, which is then hidden.update_menu_items()this can be overridden per menu to update items based on changes to your application, such as showing hidden menu items if they're now needed.show_menu_item(id)this can be used to show hidden menu items, most commonly in the method above. This uses the unique id given to the menu item.hide_menu_item(id)this can be used to hide menu items.MenuItemThis is the class used to define items for the menus in your system.
It has two constructors one for if the item is a sub menu and another for if its an action.
These should be called like this:MenuItem(id, description, subMenu or action)Methodshide()which is used on menu items, to hide them from the list.show()which is used on hidden menu items, to show them in the list.set_as_exit_option()which is used to set menu items as the exit option for a menu, either going to the parent menu, or exiting the application.ExampleMenu initialisationmainMenu = MainMenu()
mainMenu.display()Main Menu Classclass MainMenu(AbstractMenu):
    def __init__(self):
        super().__init__("Welcome to the main menu")

    def initialise(self):
        self.add_menu_item(MenuItem(100, "Exit menu").set_as_exit_option())
        self.add_menu_item(MenuItem(101, "Print Hello World", lambda: print("Hello World!")))OutputWelcome to the main menu
0. Exit menu
1. Print Hello World
Select option: 1
Hello World!

Welcome to the main menu
0. Exit menu
1. Print Hello World
Select option: 0

Process finished with exit code 0Look in demo/menu_demo.py for a better example implementation of the library.
Package: python-console-package
Python console packageThis is a small template for building, distributing and packaging a python console application.TODOS:Do thisDo thatInstallationCan be easily installed from pypi with pip3.pip3installpython_console_packageRunning from sourceYou can also alway clone the repo fromGitHuband run with python.python3launcher.py"this/is/my/source/path"or bypython3entrypoint.py"this/is/my/source/path"If installed through pypi then executing the script namepython_console_packageessentially runs something likepython3 python_console_package/entrypoint.py(this is specified throughentry_pointsinsetup.py),which is used in the further usage examples.FILES and their functionsbuild.pypython3build.pyto build and package the application using setuptools to thedistdirectory.entrypoint.pypython3entrypoint.pythis is a launcher for the main script, can be used interchangably with python_console_package/entrypoint.py.install-dev.pypython3install-dev.pyuse the pip3 installer to install this project directory to the system. (Immediatly reflects the changes done to the scripts).install.pypython3install.pyBuild the application and install the resulting package -> the installation is the same as if you would install the package from pypi.LICENCE.txtThe License of your project, do your research and choose your License with care.(Here it is APACHE 2.0)MANIFEST.inSpecifies additional non-python files that should be included into the distributed package.publish.pypython3publish.pyBuild the application and upload to pypi using twine (make sure everything is working before as you can not replace a version once it is online).After you have published the package, tag your package version and push to your git repository.Commit your changesgit commit -am "your message"Push your changesgit pushCreate a version tag in your repositorygit tag 1.0.0Push the tag to your repositorygit push --tagsREADME.mdMain description and documentation of your project.RELEASE.mdA markdown file containing info about the release versions and their changes.setup.pyThe setuptools configuration, which contains all packaging information and some installation information for your project.
Make sure to replace the info before packaging your application.
Contains:Meta information like: author, version, classifiers, url, descriptionImportent information about the structure and files of your package for installation: modules, entrypoints, name, dependenciesUsing the applicationpython_console_package--setupIf you want to provide a setup function to your users you can implement a function call when this options is specified.python_console_package--versionPrint out the version information of your packagepython_console_package"test/path/source"Call application with a positional text argument.python_console_package"test/path/source"--option"my optional argument text"Call application with a optional text argument.python_console_package"test/path/source"--multiply123896Call application with an optional argument list.python_console_package"test/path/source"--printmCall the application with an optional boolean option.If you like the project consider dropping me a coffee
Package: python-container-openstack
#### REQUIREMENTS ##### bash scripts/requirements.sh
# pip install -r requirements.txt#### FAQ ##### Utilizando Python para automatização de Openstack, Kubernetes, Docker e demais necessidades.
# Api’s para Python gerenciar o Openstack
# Api’s para Python gerenciar Kubernetes e Dockers
# Bootstrap para validação das funções do Openstack, criação de cluster em Kubernetes ou Docker utilizando Openstack.
Package: python-continuum
Copyright (c) 2010 by Joachim Bauch,mail@joachim-bauch.dehttp://www.joachim-bauch.de/projects/python-continuum/python-continuum provides a function to do consistent hashing. See
wikipedia[1]for more informations about this technique.First we need the continuum object that serves as storage for server
informations and can later be used to resolve keys:>>> from continuum import Continuum
>>> c = Continuum()Empty continuums obviously can’t be queried:>>> c.resolve('my-key1')
Traceback (most recent call last):
...
IndexError: empty continuumAdd the server objects that are available as backends:>>> c.add_server('192.168.0.1', 8080)
<Server "192.168.0.1:8080", capacity=1>
>>> c.add_server('192.168.0.2', 8080)
<Server "192.168.0.2:8080", capacity=1>You can also specify different capacities of the server to priorize
them (this defaults to 1):>>> c.add_server('192.168.0.3', 8080, 2)
<Server "192.168.0.3:8080", capacity=2>Server objects can also be removed:>>> server = c.add_server('192.168.0.4', 8080)
>>> c.remove_server(server)
>>> len(c)
3Please note that a server can only be added once:>>> c.add_server('192.168.0.2', 8080)
Traceback (most recent call last):
...
TypeError: server already addedAfter all servers have been added, the continuum can be queried for the
server that should be used for a given (string) key:>>> c.resolve('my-first-key')
<Server "192.168.0.1:8080", capacity=1>
>>> c.resolve('my-other-key')
<Server "192.168.0.3:8080", capacity=2>[1]http://en.wikipedia.org/wiki/Consistent_hashing
Package: python-control4-lite
# Control4 API Bindings for Python## Developers### Test1.export CONTROL4_URL=http://1.2.3.4/rest1.python setup.py test### Setup1. Install Python 3export PATH=/usr/local/bin:/usr/local/sbin:$PATH; brew install python1. Upgrade Pippip install –upgrade pip1. Install Pipenvpip install –user pipenv1. Install Virtualenvpip install virtualenv### Publish1.python setup.py sdist bdist_wheel1.twine upload dist/*
Package: python-converters
ConvertersInstallInstall using pip:pip install python-convertersOverviewAt its most basic,Convertersprovides a small in-python DSL / declarative mechanism to define transformations operations (”conversions") that allow you to rename, alter, add, clean etc. fields of objects / maps conveniently, making it easy to work with nested structures and a host of other common cases.Here is a quick example of using a subclass ofConverterto convert from one
instance to another:fromconvertersimportConverterclassMyConverter(Converter):from_class=dictto_class=dictconversions=['a',# to['a'] = from['a']('b','a'),# to['b'] = from['a']('c',NOS,'a default'),# to['c'] = 'a default'('d','a',lambdax:x*2),# to['d'] = from['a'] * 2('e',NOS,dict),# to['e'] = dict()]MyConverter({'a':1}).convert()# yields {'a': 1, 'b': 1, 'c': 'a default', 'd': 2, 'e': {}}But that is just the beginning. Its real power comes as you start to nest converters and subclass the core converter class to support different data formats. The power of it is that you can get going with very simple examples, but as your needs grow you’ll find that converters rises to meet them, and are highly extendable for the cases where they don’t.And to get you started there are already extensions for converting to and from:django modelsXML documentspandas dataframesfixed width string formats (!)Why is this useful?Doing conversions of data (e.g. ingest, exgest) normally seems like a simple job, but naive approaches end up writing a lot of (often
one-off) boilerplate and repetitive code that is hard to read and update, inconsistent and error prone, with code often spread throughout
several ad hoc functions. Converters provides a single place to put conversions, uses class inheritance to share domain-specific
operations, and through that and its maximal approach to features minimizes client boilerplate.
Package: python-cookiecutter
Hypermodern Python GuideThis repository follows the series of articles forhypermodern python.What is used:Package, dependency, and environment manager:condaPackage and dependency manager:poetryPackage manager:pipContinuous integration:GitHub ActionsCommand-line interface:clickManaging git hooks:pre-commitData validation:desert,marshmallowTesting:Unit testing:pytestTest automation:noxSecurity audit:SafetyCode coverage:Coverage.pyCoverage reporting:codecovDocumentation:Check documentation examples:xdoctestDocumentation:sphinxGenerate API documentation:autodoc,napoleon,sphinx-autodoc-typehintsLinting:flake8:flake8-black: generates warnings if it detects Black would reformat a source file.flake8-import-order: generates warnings if import statements are not grouped and ordered in a consistent and PEP 8-compliant way.flake8-bugbear: helps you find various bugs and design problems in your programs.flake8-bandit: find common security issues in Python code.flake8-annotations: detects the absence of type annotations for functions, helping you keep track of unannotated code.flake8-docstrings: uses the tool pydocstyle to check that docstrings are compliant with the style recommendations of PEP 257.mypy: static type checking.pytype: static type checking.typeguard: runtime type checking.darglint: checks that docstring descriptions match function definitions.Formatting:black: modifies conflicting files.Instructions not in the articles.Clone the repository.Create a new conda environment:condaenvcreate-fenvironment.ymlDownloadCoverage.pyusingzshcli:poetryadd--dev'coverage[toml]'pytest-cov
Package: python-cordova
===============================================python-cordova===============================================This is a very simple Python library to interface with the Cordova (Phonegap) command line tool.Key concepts===============================================- Interact with the Cordova CLI directly from Python- Enables building and archiving PhoneGap applications from your Python codeUsage===============================================.. code-block:: pythonimport cordovaapplication = cordova.App('PhoneGap Application',APPLICATION_ROOT)application.build('android') # or any installed platformapplication.archive('ios') # or any installed platform
Package: python-correios
API Python Correios para rastreamento de encomendas.ExemploUtilização básica:#-*- encoding: utf-8 -*-
from correios import Correios
encomenda = Correios.get_encomenda('RA222491899CN')

print 'Encomenda:', encomenda.identificador
for status in encomenda.status:
    print 'Data da atualização:', status.atualizacao.date()
    print 'Hora da atualização:', status.atualizacao.time()
    print 'País:', status.pais
    print 'Estado:', status.estado
    print 'Cidade:', status.cidade
    print 'Agência:', status.agencia
    print 'Situação:', status.situacao
    print 'Observação:', status.observacao
    print
Package: python-cosmograph
Cosmograph - Async Task SchedulerCosmograph is a  library for scheduling asynchronous tasks using theapschedulerlibrary. It provides decorators to easily schedule tasks at specific times, intervals, or dates.InstallationpipinstallapschedulerQuick StartfromschedulerimportCosmograph,time_schedule,interval_schedule,date_schedule,on_shutdownUse Cosmograph and scheduling methods as neededFeaturesSchedule tasks at specific times using cron-like syntax.
Schedule tasks at regular intervals.
Schedule tasks to run at a specific date and time.
Gracefully shut down the scheduler when the application is shutting down.UsageTime Schedule@time_schedule(hour=12,minute=30)asyncdefmy_scheduled_task():print("Task executed at 12:30 PM.")Interval Schedule@interval_schedule(minutes=15)asyncdefmy_repeating_task():print("Task executed every 15 minutes.")Date Schedule@date_schedule(run_date="2023-01-01 00:00:00")asyncdefmy_one_time_task():print("Task executed once at the specified date and time.")Graceful Shutdown# Perform this during application shutdownon_shutdown()ContributionFeel free to contribute by opening issues or creating pull requests. We welcome your feedback and contributions!LicenseThis project is licensed under the MIT License AGPLv3 - see the LICENSE file for details.
Package: python-countries
python-countriesWrapsREST CountriesInstallationFrom Build:$pipinstallpython-countriesFrom Source:$gitclonehttps://github.com/leonkozlowski/python-countries.git
$cdpython-countries
$pipinstall-e.UsageCreate the client>>>client=CountriesApi()Show available endpoints>>>client.endpoints()>>>['country_name','full_name','iso_code','currency','language','capital_city','calling_code','region']Request for country data by full name>>>client.full_name('Colombia')Response forfull_nameendpoint{"name":"Colombia","topLevelDomain":[".co"],"alpha2Code":"CO","alpha3Code":"COL","callingCodes":["57"],"capital":"Bogotá","altSpellings":["CO","Republic of Colombia","República de Colombia"],"region":"Americas","subregion":"South America","population":48759958,"latlng":[4.0,-72.0],"demonym":"Colombian","area":1141748.0,"gini":55.9,"timezones":["UTC-05:00"],"borders":["BRA","ECU","PAN","PER","VEN"],"nativeName":"Colombia","numericCode":"170","currencies":[{"code":"COP","name":"Colombian peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Kolumbien","es":"Colombia","fr":"Colombie","ja":"コロンビア","it":"Colombia","br":"Colômbia","pt":"Colômbia"},"flag":"https://restcountries.eu/data/col.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas"..."]}],"cioc": "COL"}CountryResponsefacade for easy attribute access>>>colombia=client.full_name('Colombia')>>>colombia.name>>>"Colombia">>>colombia.flag>>>"https://restcountries.eu/data/col.svg"