Saravanan666/pypi-org huggingface dataset:
Package: hatch-pip-compile
hatch-pip-compilehatchplugin to usepip-compile(oruv) to manage project dependencies and lockfiles.UsageThehatch-pip-compileplugin will automatically runpip-compilewhenever your
environment needs to be updated. Behind the scenes, this plugin creates a lockfile
atrequirements.txt(non-default lockfiles are located atrequirements/requirements-{env_name}.txt). Once the dependencies are resolved
the plugin will install the lockfile into your virtual environment and keep it
up-to-date.InstallationDeclarehatch-pip-compileas a dependency in yourpyproject.tomlfile under the[tool.hatch.env]table and hatch will automatically install it. You must also have
your environment type set topip-compile(seeConfiguration).pyproject.toml[tool.hatch.env]requires=["hatch-pip-compile"][tool.hatch.envs.default]type="pip-compile"hatch.toml[env]requires=["hatch-pip-compile"][envs.default]type="pip-compile"ConfigurationSet your environment type topip-compileto use this plugin for the respective environment:pyproject.toml[tool.hatch.envs.default]type="pip-compile"hatch.toml[envs.default]type="pip-compile"Common Scenarioslock-filename- changing the default lockfile pathpip-compile-constraint- syncing dependency versions across environmentsUpgrading Dependencies- how to upgrade dependenciesUsing Hashes- how to include hashes in your lockfileUsing uv instead of pip-compile- how to useuvinstead ofpip-compileConfiguration OptionsThe plugin gives you options to configure how lockfiles are generated and how they are installed
into your environment.The following example shows how to specify thepip-compile-hashesoption
on your environment in yourpyproject.tomlfile:[tool.hatch.envs.default]type="pip-compile"pip-compile-hashes=trueGenerating Lockfilesnametypedescriptionlock-filenamestrThe filename of the ultimate lockfile.defaultenv isrequirements.txt, non-default isrequirements/requirements-{env_name}.txtpip-compile-constraintstrAn environment to use as a constraint file, ensuring that all shared dependencies are pinned to the same versions.pip-compile-hashesboolWhether to generate hashes in the lockfile. Defaults tofalse.pip-compile-resolverstrWhether to usepip-compileoruvto resolve dependencies into the project. Defaults topip-compilepip-compile-argslist[str]Additional command-line arguments to pass topip-compile-resolverpip-compile-verboseboolSet totrueto runpip-compilein verbose mode instead of quiet mode, set tofalseto silence warningsInstalling Lockfilesnametypedescriptionpip-compile-installerstrWhether to usepip,pip-sync, oruvto install dependencies into the project. Defaults topippip-compile-install-argslist[str]Additional command-line arguments to pass topip-compile-installerCheck Out theDocsExamples 📚Upgrading 🚀Command Line Usage 📦Notes 📝Looking to contribute? See theContributing GuideSee theChangelog
Package: hatch-pip-deepfreeze
hatch-pip-deepfreezeAhatchvirtualenvironmentplugin to lock
dependencies withpip-deepfreeze.Installationhatch-pip-deepfreezemust be installed in the same environment ashatchitself.Ifhatchhas been installed withpipx:pipx runpip hatch install hatch-pip-deepfreezeIfhatchhas been installed withpipin the user environment:pip install --user hatch-pip-deepfreezeUsageIn thetool.hatch.envs.{name}section, addtype = "pip-deepfreeze".
Such environments behave similarly to the standard hatchvirtualenvironments,
except the installation and synchronization is performed usingpip-deepfreeze sync.This will automatically generate locked dependencies inrequirements.txt, and
uninstall unneeded dependencies after removing them frompyproject.toml.
It also pins optional dependencies groups inrequirements-{extra}.txt.You can use thefeaturesto installproject.optional-dependenciesin environments.Note that this pluging does not support per environmentdependencies, becausepip-deepfreezeworks exclusively withproject.optional-dependenciesfor that.
Fortunately this is well supported byhatch.As an example, you can adapt apyproject.tomlgenerated byhatch newlike so:Declare optional dependencies for test:[project.optional-dependencies]test=["pytest","pytest-cov",]Update the default environment section to removedependenciesand addfeatures:[tool.hatch.envs.default]type="pip-deepfreeze"features=["test"]Use the usualhatchenvironment activation features such ashatch shelland noticepip-deepfreezein action.Licensehatch-pip-deepfreezeis distributed under the terms of theMITlicense.
Package: hatch-polylith-bricks
Hatch Build Hook for PolylithA plugin forHatchand the Polylith Architecture.This build hook will look for Polylithbricksinpyproject.tomlandoptionallyre-write the imports made in the source code.Installation[build-system]requires=["hatchling","hatch-polylith-bricks"]build-backend="hatchling.build"[tool.hatch.build.hooks.polylith-bricks]# NOTE: this section is needed to enable the hook in the build process, even if emptyThis Build Hook has two main usages:identify the included Polylith bricks from thepyproject.toml, and hand them over to the Hatch build process.add support for building Python libraries by re-writing source code with a custom top namespace.Bricks are added to a project with relative paths, from thebasesandcomponentsfolders in a Polylith Workspace.
The hook will add the bricks to the Hatch in-memory build config (force-include) provided by the Hatch build process.
This will make the builtwheelandsdistinclude proper paths to the source code.Polylith Bricks are defined in thetool.polylith.brickssection of thepyproject.toml:[tool.polylith.bricks]"../../bases/my_namespace/my_base"="my_namespace/my_base""../../components/my_namespace/my_component"="my_namespace/my_componentPolylith documentationthe Python tools for the Polylith ArchitectureWhy re-write code?Building libraries is supported inthe Python tools for the Polylith Architecture,
but you will need to consider that code will share the same top namespace with any other library built from the same monorepo.This can be a problem when more than one of your libraries are installed into the same virtual environment.
Python libraries by default are installed in a "flat" folder structure, two libraries with the same top namespace will collide.A Solution: add a custom top namespace during packaging of the library with Hatch and this build hook plugin.How is this done?The code in this repo usesAST(Abstract Syntax Tree) parsing to modify source code.
The Python built-inastmodule is used to parse and un-parse Python code.What's the output from this plugin?Without any custom namespace in the configuration: no changes in the code. Building and packaging as-is.With a Top Namespace configuration[tool.polylith.build]top-namespace="my_custom_namespace"my_custom_namespace/my_namespace//my_package__init__.pymy_module.pyBefore:frommy_namespace.my_packageimportmy_functionAfter:frommy_custom_namespace.my_namespace.my_packageimportmy_functionUsageKeyDefaultDescriptionwork-dir.polylith_tmpThe temporary working directory for copying and re-writing source code.Polylith documentationthe Python tools for the Polylith Architecture
Package: hatch-regex-commit
hatch-regex-commitThis provides a plugin forHatchthat automatically creates a Gitcommitandtagafter version bumping.Global dependencyEnsurehatch-regex-commitis defined within thebuild-system.requiresfield in yourpyproject.tomlfile.[build-system]requires=["hatchling","hatch-regex-commit"]build-backend="hatchling.build"Version sourceTheversion source pluginname isregex_commit.pyproject.toml[tool.hatch.version]source="regex_commit"path="my_library/___about___.py"hatch.toml[version]source="regex_commit"path="my_library/___about___.py"Version source optionsThis plugin inherits from the Hatch builtinRegex version source. It inherits from all itsoptionsand add the following ones:OptionTypeDefaultDescriptioncheck_dirtybooltrueCheck if the Git repository is dirty, e.g., you have uncommited changes. If you have, the version bumping will abort.commitbooltrueWhether to create a Git commit.commit_messagestrBump version {current_version} → {new_version}Template of the Git commit message.commit_extra_argslist[str][]List ofextra argumentsfor Git commit command.tagbooltrueWhether to create a Git tag.tag_namestrv{new_version}Template for the Git tag name.tag_messagestrBump version {current_version} → {new_version}Template of the Git tag message.tag_signbooltrueWhether to sign the Git tag.ExamplesBasic[tool.hatch.version]source="regex_commit"path="my_library/___about___.py"Custom commit message[tool.hatch.version]source="regex_commit"path="my_library/___about___.py"commit_message="🚀 Version {new_version}"Edit commit message in the editor before proceeding[tool.hatch.version]source="regex_commit"path="my_library/___about___.py"commit_extra_args=["-e"]Disable Git tag[tool.hatch.version]source="regex_commit"path="my_library/___about___.py"tag=falseLicensehatch-regex-commitis distributed under the terms of theMITlicense.
Package: hatch-requirements-txt
Hatchling plugin to read project dependencies from requirements.txtTestsPyPIAnacondaActivityQAOtherUsageIn yourpyproject.tomlmake the following changes:Appendhatch-requirements-txttobuild-system.requires.Append"dependencies"toproject.dynamic.Add the following table:[tool.hatch.metadata.hooks.requirements_txt]files=["requirements.txt"]The resultingpyproject.tomlshould look something like:[build-system]requires=["hatchling","hatch-requirements-txt"]build-backend="hatchling.build"[project]name="my-project"version="1.0.0"dynamic=["dependencies"][tool.hatch.metadata.hooks.requirements_txt]files=["requirements.txt"]You can also define groups ofoptional dependencies(also known as “features”) by appendingoptional-dependenciestoproject.dynamicand adding a table like:[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]crypto=["requirements-crypto.txt"]fastjson=["requirements-fastjson.txt"]cli=["requirements-cli.txt"]Requirements file formathatch-requirements-txtonly supports a subset of therequirements.txtformatsupported bypip.
The following are supported:requirement specifiers, perPEP 508Comments, prefixed with a#.--<option>options, both on their own line and after a requirement specifier.
Note however that the options themselves are ignored.The following are unsupported withinrequirements.txtfiles:Editable install commands with the-eoption,References to other requirements or constraints files with the-ror-coptions.References to paths on the local filesystem, or URLs.TL;DRFor best compatibility, ensure all lines in yourrequirements.txtfiles
are valid PEP 508 requirements, or comments starting with a#.
Package: hatchrestbluepy
Hatch Rest Python LibraryThis library allows an originalHatch Restto be controlled via BLE. This library uses thebluepylibrary as a backend, and therefore only runs on Linux. This library is primarily intended to be run on Raspberry Pi devices.Installationpip install hatchrestbluepyIf you intend to use this library without elevated privileges, you will need to findbluepy-helperand run the following command to enable BLE access.sudo setcap 'cap_net_raw,cap_net_admin+eip' bluepy-helperExampleCreditsThis library is heavily based on thepyhatchbabyrestlibrary, written by@kjoconnor.
Package: hatch-semver
hatch-semverA plugin forhatchto supportsemantic versioning. Hatch-semver relies onpython-semverfor all the versioning logic.SetupIntroduce hatch-semver as a build-dependency to your project (in yourpyproject.toml):[build-system]requires=["hatchling","hatch-semver",]build-backend="hatchling.build"Further down inpyproject.toml,
where you set up thehatch versioncommand,
set version scheme tosemver:[tool.hatch.version]path="src/<your_project>/__about__.py"validate-bump=truescheme="semver"BewareHatch-semver plugin will only work with project versions which can be readily parsed bypython-semver.
Therefore, if you are introducing hatch-semver into an existing project, you mustmake sure that the project's current version is a valid semantic version.You can test thathere.Quick StartMany of hatch'sstandard versioningcommands also work for hatch-semver to bump your project's version in a semver-compliant way.
Such command is written as a single string of comma-separated bump instructions as a positional argument of thehatch versionsubcommand, i.ehatch version <COMMAND>.Starting with0.1.0as the original version, here is a series of example commands which illustrate some common ways how to bump the version:Old VersionCommandNew Version0.1.0patch0.1.10.1.1minor,patch,patch0.2.20.2.2minor0.3.00.3.0rc0.3.1-rc.10.3.1-rc.1rc0.3.1-rc.20.3.1-rc.2release0.3.10.3.10.9.50.9.50.9.5major,rc1.0.0-rc.11.0.0-rc.1release1.0.0See thecommand referencefor all the commands in full detail. If you are familiar with hatch's standard versioning scheme, perhaps acomparisonof the standard scheme and hatch-semver will be of interest.
Package: hatch-showcase
hatch-showcaseCI/CDPackageMetaThis project is meant to showcase various features and plugins forHatchas well as providing a place to test experimental functionality.Table of ContentsInstallationVersion sourceEnvironmentsBuildLicenseInstallationpip install hatch-showcaseVersion sourceThehatch-vcsversion source plugin determines the project version using Git tagsEnvironmentsDefined neatly in a standalonehatch.tomlThetestmatrix uses thehatch-containersplugin to run each environment inside Docker containers; usage can be seen in thetestGitHub workflowBuildAll build targets use thehatch-vcsbuild hook plugin to ship a_version.pyfile so the version can be used at runtimeWheels use thehatch-mypycbuild hook plugin to first compile all code withMypycThebuildGitHub workflow shows how to:usecibuildwheelto distribute binary wheels for every platformuse theappbuild target to build standalone distributions for every platformLicensehatch-showcaseis distributed under the terms of theMITlicense.
Package: hatch-vcs-tunable
hatch-vcs-tunableThis is a plugin forHatchthat extends the pluginhatch-vcsto allow for overriding some config elements with environment variables.The reason you might want to do this is if you have multiple release tracks for your package, or multiple contexts in which it is used, and want to give it different versions in those different contexts.Table of ContentsUse as a pluginConfigurationLicensePluginEnsurehatch-vcs-tunableis listed in thebuild-system.requiresfield in yourpyproject.toml:[build-system]requires=["hatchling","hatch-vcs-tunable"]build-backend="hatchling.build"Configurationhatch-vcs-tunablecan be configured either throughpyproject.toml, using exactly the same configuration elements ashatch-vcsbut with the plugin namevcs-tunable, or via environment variable overrides.pyproject.tomlUse the same configuration elements ashatch-vcs, but the plugin namevcs-tunable. For instance, to set the version file you would do:[tool.hatch.build.hooks.vcs-tunable]version-file="_version.py"EnvironmentThe environment variables should be specified asALL_CAPS_UNDERSCOREversions of the pyproject settings, prefixed withHATCH_VCS_TUNABLE_. So for instance,tag-patterncan be specified asHATCH_VCS_TUNABLE_TAG_PATTERNfallback-versioncan be specified asHATCH_VCS_TUNABLE_FALLBACK_VERSIONraw-optionsThe value of theraw-optionsis passed directly tosetuptools_scm. It may have multiple keyword arguments, which need both a name and a value, and the keywords may not be safe to put in the names of environment variables, so both the names and values are passed in the environment variable value. These should be passed as a string ofkey-name=valueseparated by;. For instance, to specify bothrelative_to=..andversion_file=/some/path, you would doHATCH_VCS_TUNABLE_RAW_OPTIONS="relative_to=..;version_file=/some/path".If a setting is specified both in the environment and inpyproject.toml, the environment variable will take priority.Environment variables that are specified as empty still exist, so if you doHATCH_VCS_TUNABLE_FALLBACK_VERSION=  hatch build, the fallback version will be the empty string. If you have one of these environment variables defined all the time and need to remove it, useunset.Licensehatch-git-version-tunableis distributed under the terms of theApache-2.0license.
Package: hatch-ziptz
hatch-msgfmtA hatch msgfmt plugin, simply replacing all po files with mo files, using msgfmt inPATH.I had planned to originally integrate msgfmt.py, but that didn't work in my own uses.If you find a way to get that working (or find any other issues in the plugin),
I'll gladly accept pull requests.The plugin takes adestinationconfiguration parameter determining the desired output.CopyrightThis plugin is Copyright 2023 Absolute Performance, Inc.MIT licensed.
Package: hat-doit
Hat open projects usespydoitas build automation tool. This repository
provides utility functions commonly used in definition of doit tasks.For more information seegit repository.Runtime requirementspython >=3.10Installhat-doitis available asPyPI project:$ pip install hat-doitBuildTo install editable installation, together with python dependencies, run:$ pip install -e .To install only python dependencies, run:$ pip install -r requirements.pip.txtBuild tool used forhat-doitis pydoit. For listing available doit tasks,
use:$ doit listDefault task:$ doitcreates wheel package insidebuilddirectory.Hat Openhat-doitis part ofHat Openproject - open-source framework of tools
and libraries for developing applications used for remote monitoring, control
and management of intelligent electronic devices such as IoT devices, PLCs,
industrial automation or home automation systems.Development of Hat Open and associated repositories is sponsored byKončar Digital.LicenseCopyright 2020-2024 Hat Open AUTHORSLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: hat-drivers
For more information see:online documentationgit repositoryRuntime requirementspython >=3.10Installhat-driversis available asPyPI project:$ pip install hat-driversBuildTo install editable installation, together with python development
dependencies, run:$ pip install -e '.[dev]'To install only python development dependencies, run:$ pip install -r requirements.pip.txtBuild tool used forhat-driversispydoit. For listing available doit
tasks, use:$ doit listDefault task:$ doitcreates wheel package insidebuilddirectory.Hat Openhat-driversis part ofHat Openproject - open-source framework of tools
and libraries for developing applications used for remote monitoring, control
and management of intelligent electronic devices such as IoT devices, PLCs,
industrial automation or home automation systems.Development of Hat Open and associated repositories is sponsored byKončar Digital.LicenseCopyright 2020-2023 Hat Open AUTHORSLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: hat-duktape
For more information see:online documentationgit repositoryRuntime requirementspython >=3.10Installhat-duktapeis available asPyPI project:$ pip install hat-duktapeBuildBuild tool used forhat-duktapeispydoit. It can be installed together
with other python dependencies by running:$ pip install -r requirements.pip.dev.txtFor listing available doit tasks, use:$ doit listDefault task:$ doitcreates wheel package insidebuilddirectory.Hat Openhat-duktapeis part ofHat Openproject - open-source framework of tools
and libraries for developing applications used for remote monitoring, control
and management of intelligent electronic devices such as IoT devices, PLCs,
industrial automation or home automation systems.Development of Hat Open and associated repositories is sponsored byKončar Digital.LicenseCopyright 2020-2023 Hat Open AUTHORSLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: hatebase
hatebasePython Version of Andrew Welter's Hatebase Wrapper
Using the current 4.2 Version of the Hatebase APIInstallpipinstallhatebaseRequirementspipinstallrequestsHatebaseAPI functionsInitialize HatebaseAPI classfromhatebaseimportHatebaseAPIkey='yourHatebaseAPIKeyString'hatebase=HatebaseAPI({"key":key})# for more details, set debug to Truehatebase=HatebaseAPI({"key":key,"debug":True})HatebaseAPI getVocabulary# set filters for vocabulary queryfilters={"language":"eng"}format="json"response=hatebase.getVocabulary(filters=filters,format=format)# get some details from responsevocablist=response["result"]results=response["number_of_results"]pages=response["number_of_pages"]HatebaseAPI getVocabularyDetailsformat="json"details_filters={'vocabulary_id':vocab_id}response=hatebase.getVocabularyDetails(filters=details_filters,format=format)HatebaseAPI getSightingsfilters={'is_about_nationality':'1','language':'eng','country_id':'US'}format="json"response=hatebase.getSightings(filters=filters,format=format)HatebaseAPI analyze# TBDHatebaseAPI getAnalysis# TBDExamplesGet All the Hate Speech in English About Nationality in the USimportjsonimportrequestsfromhatebaseimportHatebaseAPIhatebase=HatebaseAPI({"key":key})filters={'is_about_nationality':'1','language':'eng','country_id':'US'}format="json"json_response=hatebase.getSightings(filters=filters,format=format)Get All Arabic VocabularyfromjsonimportrequestsimportpandasaspdfromhatebaseimportHatebaseAPIhatebase=HatebaseAPI({"key":key})filters={"language":"ara"}format="json"# initialize list for all vocabulary entry dictionariesara_vocab=[]response=hatebase.getVocabulary(filters=filters,format=format)pages=response["number_of_pages"]# fill the vocabulary list with all entries of all pages# this might take some time...forpageinrange(1,pages+1):filters["page"]=str(page)response=hatebase.getVocabulary(filters=filters,format=format)ara_vocab.append(response["result"])# create empty pandas df for all vocabulary entriesdf_ara_vocab=pd.DataFrame()# fill dfforeleminara_vocab:df_ara_vocab=df_ara_vocab.append(elem)# reset the df indexdf_ara_vocab.reset_index(drop=True,inplace=True)For more documentation on the API check outhttps://github.com/hatebase/Hatebase-API-DocsTestingTo test the package runpython-munittesthatebase.tests.test