Saravanan666/pypi-org huggingface dataset:
Package: poetry-example-dg
Notespoetrynewenv use path_to_pythontraining videohow to use package in editable modeadd:[tool.poetry.scripts]
alias = 'package_name.script_name:function_name'e.g.
[tool.poetry.scripts]
eve = 'poetry_example_dg.cli:cli'poetryrunevevscode cant find poetry envpoetryconfigvirtualenvs.in-projecttrueThe virtualenv will be created inside the project path and vscode will recognize.If you already have created your project, you need to re-create the virtualenv to make it appear in the correct place:poetryenvlist# shows the name of the current environmentpoetryenvremove<currentenvironment>
poetryinstall# will create a new environment using your updated configurationtestingpoetryrunpytestgetting package ready for publishingadd to toml:[tool.poetry]
name = "dbt-cloud-cli-python-remake"
version = "0.1.0"
description = ""
authors = ["David Griffithsdavidgg777@hotmail.com"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/wisemuffin/repo"
repository = "https://github.com/wisemuffin/repo"
keywords = ["wisemuffin"]upload package to pypipoetry build - creates files in sdist (source format) and wheel (dist format)
poetry publish - pushes to pypi:warning:pypi prompting for password*:see here!orpoetry publish -r testpypi - make sure it looks good firsthttps://test.pypi.org/project/project_name/non pypi:
poetry config repositories.my_repohttps://foo.bar/simple/poetry publish -r my_repo
Package: poetry-example-project
poetry-example-projectInstallationpipinstallpoetry
poetryinitDans le init, on renseigne l'ensemble des informations demandées, ainsi que les dépendances anciennements requises par le projet.Initialisation du répertoirepoetry_example_project/
    __init__.py
    hello.py
tests/
    __init__.py
    test_hello.pyPuis exécuter la commande suivante :poetryrunpytestConfiguration des repositories privéescf doc :https://python-poetry.org/docs/repositories/poetrysourceaddmon_nexushttps://mon_nexus.exemple/simple/
poetrysourceaddmon_nexus_prodhttps://mon_nexus_prod.exemple/simple/

poetryconfighttp-basic.mon_nexus<username><password>
poetryconfighttp-basic.mon_nexus_prod<username><password>Pour publier spécifiquement sur le repository mon_nexus_prod :poetrypublish--repository=mon_nexus_prodMettre à jour une versionpoetry version 0.1.1
Package: poetry-exec-plugin
poetry-exec-pluginA plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenvInstallationInstallation requires poetry 1.2.0+. To install this plugin run:poetry self add poetry-exec-pluginFor other methods of installing plugins see thepoetry documentation.UsageTo use this plugin, first define the scripts that you wish to be able to execute in yourpyproject.tomlfile under a section calledtool.poetry-exec-plugin.commands. For example:[tool.poetry-exec-plugin.commands]hello-world="TEXT=hello-world; echo $TEXT"lint="flake8"This will define a script that you can then execute with thepoetry exec <script>command. This will execute your script inside of the environment that poetry creates for you, allowing you to access the dependencies installed for your project. The script will also always run from the same directory as yourpyproject.tomlfile. This mimics the behaviour of npm/yarn. For example:$poetryexechello-world
hello-world

$poetryexeclint
./my_file.py:29:25:E222multiplespacesafteroperatorAnything that you append to your exec command will be appended to the script. You can use this to pass extra flags and arguments to the commands in your scripts. For example:$poetryexechello-worldonetwothree
hello-worldonetwothree

$poetryexeclint--version3.9.2(mccabe:0.6.1,pycodestyle:2.7.0,pyflakes:2.3.1)CPython3.9.0onDarwinPublishingTo publish a new version,first bump the package version inpyproject.tomland commit your changes to themainbranch (via pull request). Then in GitHub create a new release with the new version as the tag and name. You can use the handy auto release notes feature to populate the release description.
Package: poetry-experiment
This repo is just an experiment to test out poetryKey things:
easyily turn program.py topoetryexprunnable program that can be installed withpip install poetry-experimentor other available pypi package nameIn a new project folder (package-root):rungit initorgit clonebeforehandcreate README.md if missingpropper py packageput program.py in package folder poetry-experiment/createinit.py (import program) inside, in poetry-experiment/poetry initadd script to tomlpoetry buildpoetry config pypi-token.pypi your-api-tokenpoetry publishpackage-root/
	README.md
	poetry.toml (fix name)
	poetry-experiment/
		__init__.py #import program inside
		program.py 
	.git/To accomplish this, you can follow these steps:Create apyproject.tomlfile: Make sure you have apyproject.tomlfile in your project directory. Poetry uses this file to manage project dependencies and settings.Add metadata topyproject.toml: You'll need to define metadata such as the project name, version, and description in thepyproject.tomlfile.Define entry points: In yourpyproject.toml, you can define entry points for your command-line interface (CLI) using the[tool.poetry.scripts]section. This will allow users to run your program using a specified name.Write yourprogram.py: Write the Python script that you want to publish.Build your package: Use Poetry to build your package. This will generate a distributable package that can be uploaded to PyPI.Publish to PyPI: Once your package is built, you can publish it to PyPI using Poetry'spublishcommand.Here's a step-by-step guide:Create apyproject.tomlfile if you don't already have one. It should look something like this:[tool.poetry]name="poetry_experiment"version="1.0.0"description="A description of your program"authors=["Your Name <your.email@example.com>"][tool.poetry.dependencies]python="^3.8"[build-system]requires=["poetry-core>=1.0.0"]build-backend="poetry.core.masonry.api"[tool.poetry.scripts]poetryexp="program:main"Write yourprogram.py. Make sure it has a function namedmain, which will be called when users run your program.defmain():print("Hello, world!")Once you've written your script and configured yourpyproject.toml, you can use Poetry to build your package:poetrybuildAfter the build is successful, you can publish your package to PyPI:poetrypublish--buildAfter publishing, users can install your package using pip:pipinstallpoetry_experimentOnce installed, users can run your program using the specified entry point:poetryexpThis will execute themain()function defined in yourprogram.py.
Package: poetry-external-dependencies
poetry-external-dependenciesThe package is apoetry plugin, it extend the capability of poetry when installed in your environment.When runningpoetry buildthis plugin will look in the project toml configuration for anexternalsection and addsdependenciesin the built package's metadata as aRequires-Externalentry.#####Toml example:[external]
dependencies = ["pkg:generic/libsomething"]The toml syntax is not final, it is currently drafted inPEP725.
Onlydependenciesare supported by this plugin,host-requiresandbuild-requiresare ignored,optional-xxxfields are also ignored.InstallationPoetry doesn't currently support auto installation of plugin from a pyproject.toml, in order to use this plugin you will need to install it using pip:$pipinstallpoetry-external-dependenciesThis needs to be installed in the same environnement as the one in which poetry is installed
Package: poetry-git-branch-plugin
Poetry Git Branch PluginA simple poetry plugin that sets an environment variable containing the name of the current checked-out branch before executing any poetry command.WhyOur main use case is in situations where DBT needs access to the current git branch name to set the name of the target schema.InstallationThe plugin cannot be installed withpoetry self addbecause it is not published on PyPI.
Instead, you can install it by building a wheels filepoetrybuildand installing it with your system-wide or pyenv-wide pip.# not inside pycharm nor inside a poetry shellpipinstall/path/to/poetry-git-branch-plugin/dist/poetry_git_branch_plugin-0.1.0-py3-none-any.whl
Package: poetry-githooks
poetry-githooksInstallThis repository is made to work withpoetry. Assuming you have a workingpoetrysetup, runpoetry add -D poetry-githooksInstallCreate atool.githookssection in yourpyproject.tomlfile and define your git hooks, for example[tool.githooks]
pre-commit = "black ."then runpoetry run githooks setupThat's it :tada: your hooks will be ran usingpoetrywhen expectedIMPORTANTYou need to rerunpoetry run githooks setupeverytime you change[tool.githooks]
Package: poetry-grpc-plugin
Poetry gRPC pluginAPoetryplugin to run the Protocol Buffers compiler with gRPC support.Installing the pluginRequires Poetry version1.2.0or abovepoetryselfaddpoetry-grpc-pluginUsageTo run it manually:poetry help protocUsage:protoc [options]Options:--proto_path[=PROTO_PATH]             Base path for protobuf resources. [default: "<module_name>"]--python_out[=PYTHON_OUT]             Output path for generated protobuf wrappers. [default: "."]--grpc_python_out[=GRPC_PYTHON_OUT]   Output path for generated gRPC wrappers. Defaults to same path as python_out.--mypy_out[=MYPY_OUT]                 Output path for mypy type information for generated protobuf wrappers. Defaults to same path as python_out.--mypy_grpc_out[=MYPY_GRPC_OUT]       Output path for mypy type information for generated gRPC wrappers. Defaults to same path as grpc_python_out.--venv_proto_paths[=VENV_PROTO_PATHS] Additional protobuf resources paths, from the plugin's venv. Defaults to None....Run onpoetry update[tool.poetry-grpc-plugin]Additional config[tool.poetry-grpc-plugin]proto_path="protos"# Defaults to module namepython_out="."# Defaults to .venv_proto_paths=["google/type"]# Defaults to NoneSettings inpyproject.tomlwill be used as defaults for manual execution withpoetry protoc.Usingvenv_proto_paths, one can import additional protos from packages installed in the same virtual environment as this plugin. For example:pipxinjectpoetrygoogleapis-common-protos[tool.poetry-grpc-plugin]...venv_proto_paths=["google/type"]# Defaults to NoneThen in your proto file you can do:import"latlng.proto";
Package: poetry-install-prod-plugin
Install ProdAdds a commandpoetry install-prodwhich forces local (path) dependencies to be installed in non-editable mode, even when marked as editable. This is particularly useful for monorepo architectures with many cross-dependencies. In a development environment it is desireable to install local (path) dependencies as symbolic links so they are editable, but in a production or CI/CD environment it is necessary to install all dependencies as non-editable.
Package: poetryize
PoetryizePoetryize is a command-line tool built with Typer that facilitates the conversion of requirements.txt files into pyproject.toml files. This allows seamless integration with Poetry, a dependency manager for Python projects. If you've ever found yourself wanting to use Poetry for dependency management but stuck with a project that uses requirements.txt, Poetryize is here to help.FeaturesSeamless Conversion: Poetryize effortlessly transforms requirements.txt files into pyproject.toml files compatible with Poetry.Dependency Initialization: Poetryize automatically initializes Poetry if a pyproject.toml file is not found in the project, streamlining the conversion process.Error Handling: Poetryize includes error-handling mechanisms to address issues with the specified requirements file, providing informative messages to guide users.Versatile Support: Poetryize supports a range of requirements.txt formats, including:package==versionpackage>=versionpackage<=versionpackage~=versionpackageInstallationpipinstallpoetryizeExample/Usage1. Using Poetryize on project folder with requirements.txt file├── create_db.py
├── database.py
├── main.py
├── models.py
├── __pycache__
│   ├── database.cpython-310.pyc
│   ├── main.cpython-310.pyc
│   └── models.cpython-310.pyc
├── requirements.txt
└── test_main.httpRun poetryize on the project folder, while in the same directory as the requirements.txt filepoetryizeNote: Using Poetryize without any requirement.txt path argument would automatically use the requirements.txt file in the project folder.2. Using Poetryize on a project with a requirements.txt file in a different folderpoetryize/path/to/requirements.txtDemoLicenseThis project is licensed under theMITLicense.
Package: poetry-jupyter-plugin
poetry-jupyter-pluginoverviewThis is a really simple plugin to allow you to install yourPoetryvirtual environment as aJupyterkernel. You may wish to do this to keep your
dependencies locked down for reproducible notebooks, or to set up a single
"data science" notebook for one-off calculations without fiddling about with
installing packages globally or dealing withipykerneldirectly.getting startedInstall the plugin with:$poetryselfaddpoetry-jupyter-pluginThen, from within your poetry project:$poetryinstallipykernel-Gdev
$poetryjupyterinstallRemove the kernelspec with:$poetryjupyterremoveconfigurationBy default, the installed kernel will use the name of the project and a default
Poetry icon. To configure these options, add this block to yourpyproject.toml:[tool.jupyter.kernel]name="my-cool-kernel"display="My cool kernel"icon="/path/to/icon.png"prior artThere are other projects in this space, notably Pathbird's [poetry-kernel].poetry-kernelinstalls a single kernelspec globally which then patches the
virtualenv based on the specific project folder that you're running Jupyter in.
This has some pros and cons over this project.Pros:Single kernelspec, avoiding polluting the kernelspec list with lots of specs.Easy context switching between projects.Cons:Notebooks have to be in the same folder (or a subfolder from) as thepyproject.tomlfolder.Requires forwarding signals from the launcher into Jupyter, introducing a
layer of complexity and is brittle to changes in Jupyter protocol/underlying
OS.Implicit dependency onipykernel, and may fail to start without it.In contrast, this project installs one kernelspec per virtualenv and leaves it
up to Jupyter to launch the kernel normally without interception. This design
decision also allows multiple projects to be based out of one kernel.
Additionally, the tool checks for the existence ofipykernelto make sure
that the kernel can be installed properly.who?This was written bypatrick kage.
Package: poetry-legacy-index
Poetry Legacy Index FixThis project is a poetry plugin that has one simple purpose:Patch poetry (Legacy) Repository to download wheels associated with the given platform.Why?Long story short, TensorFlow 2.11.x includes different metadata per platform wheel, and poetry simply downloads the first wheel found in a legacy index (e.g. devpi, pypiserver), which causes it to incorrectly resolve the dependencies.Another nice side effect is that (based on a discussion on the poetry repo) poetry doesn't cache the downloaded wheels at the "solving" phase, which means that if the first wheel downloaded is not the one that will be installed, it will be downloaded again and again each time (~500 MB for TensorFlow). By downloading the wheel for the given platform, it willat leastcheck the cache before attempting to download the wheel, and the wheel should be available if it was already downloaded for installation.
Package: poetry-link
poetry-linkPoetry natively does not support editable installs (as of writing this on Jan 22, 2022). This
command makes use of the Flit backend to leverage its excellent symlink support. Relevant parts of
the Poetry configuration will by adpated such that no Flit related configuration needs to be added
topyproject.toml.This package depends onSlamfor theslam linkcommand and
exposes it as plugin in Poetry.Example usage$ poetry link
Discovered modules in /projects/my-package/src: my_package
Extras to install for deps 'all': {'.none'}
Symlinking src/my_package -> .venv/lib/python3.10/site-packages/my_package
Package: poetry-lock-package
Poetry lock package generatorSimple script that will take apyproject.tomland apoetry.lockand generate a new poetry project where all the lock versions are pinned dependencies.In theory this will allow you to transport your lock file to any system that is able to install python packages and dependencies.After installation, the commandpoetry-lock-packageshould be run next to yourpyproject.tomlandpoetry.lockfiles and will generate a subdirectory with apyproject.tomlrequiring all the dependencies of the lock file.Simply enter the subdirectory, build and publish the package and you have a '-lock' package that depends on all the exact versions from your lock file.Example workflowThe example workflow below will addpoetry-lock-packageas a dev dependency, allowingpoetry runto find the command.First create a new poetry projectpoetry new example-package
cd example-packageAdd some dependencies, and see what we have build so farpoetry add loguru click
poetry install
poetry build
ls distAddpoetry-lock-packageto allow forpoetry runto find the entry point script:poetry add --dev poetry-lock-packageFinally build the lock package and see what we have gottenpoetry run poetry-lock-package --build
ls -al distYou will now have two wheel files in your dist folder: one with the project code, one nameexample-package-lockwhich depends on the exact version of all the packages specified in yourpoetry.lockfile.Using--no-rootDefault behavior is to have the lock package depend on the original package the lock was created for. If you have a private repository, this will allow you to publish both packages to the private repository and only require you to point at one package to install everything.If you want to be able to install the dependencies, but not the package itself, you can use the--no-rootcommand line argument to stoppoetry-lock-packagefrom adding your root project to the lock package dependencies.Using--ignoreIf you want to allow pip to have freedom in selecting a package, or you expect to deploy in an environment that already has the right version installed, you can opt to use--ignoreto remove that dependency from the lock package pinned dependencies.Becausepoetry-lock-packageis aware of the dependency graph, it will not only skip locking the dependency but also transitive dependencies.Contributing codeOpen an issueCreate an associated PRMake sure to black format the proposed changepoetry run pre-commit installAdd tests where possibleLicenseGPLv3, use at your own risk.
Package: poetry-merge-lock
poetry-merge-lockThis is a tool for resolving merge conflicts in the lock file ofPoetry,
a packaging and dependency manager for Python.
If the merge conflicts cannot be resolved by this tool,
you can use the--print-content-hashoption to
compute the content hash for themetadata.content-hashentry,
and resolve the conflicts manually.InstallationTo install poetry-merge-lock,
run this command in your terminal:$pipinstallpoetry-merge-lockDocumentationRead the full documentation
Package: poetry-mth
Hi there, we are Python Powerhouse!Team of developers from UkrainePowerhouse Helper is your personal console assistant that will facilitate your everyday tasks.This assistant consists of 5 parts:1. Address Book2. Note Book3. Folder Sorter4. Snake5. CalculatorHow to install?Go to the console and enter:pip install python-powerhouse-helper==1.0.0How to start the helper?Install package, then go to the console and enter:powerhouse-helperYou will be presented with a choice of different sections of the assistant, just enter the section you are interested in and you will start working with itREMARK: sections 'calculator', 'snake' and 'folder sorter' have no commandsAddress BookCommandDescriptionaddadd contactsearchsearch contact using any informationeditedits recorded contactdeletedeletes existing contactsavesave your contact book to the fileloadrecover contacts from the auto save filecongratulatefind out who you need to congratulate in the near futureshowprint all contacts that you haveexitto back to the main menuNote BookCommandDescriptionadd noteIf you want to add notechange noteIf you want to change notedelete noteIf you want to delete noteadd dateIf you want to add/change dateadd tagIf you want to add tagdoneIf you want mark note as donereturnIf you want mark note as not doneshow allIf you want to show all notesshow dateIf you want to show notes by date +- daysfind noteIf you want to find note by textfind tagIf you want to find note by tagsort by tagsIf you want to show all notes sorted by tagsCalculatorAn application made using the Tkinter package capable of performing mathematicaloperations such as addition, subtraction, multiplication and division.Folder SorterAn application that will help you sort files by folders depending on their extension.When calling "folder sorter" we need to enter the path to the folder to sort.Available Extensions:ExtensionsFolder".png", ".jpeg", ".jpg", ".svg"images".avi", ".mp4", ".mov", ".mkv"video".doc", ".docx", ".txt", ".pdf", ".xlsx", ".pptx"documents".mp3", ".ogg", ".wav", ".amr"audio".zip", ".tar", ".gz"archivesSnakeAn exciting game created using the pygame library. At the beginning, you spawn as a small snake.Bonuses are randomly created on the map, after eating which the snake grows. The snake is controlledusing the arrows on the keyboard. The number of points you have scored is shown in the corner of the screen.
Package: poetry-new-project
poetry-new-projectThis is a small CLI utility meant to make it easier to set up a new Python project using Poetry and Pyenv.Quickstart 🚀Prerequisite: Pyenv is already installed and configured on your system. If not, seepyenv installer.Install the package:pip install poetry-new-projectCreate a new project directory and cd into it:mkdir my-new-project && cd my-new-projectCreate a new pyenv environment + poetry project :poetry-new-project my-new-project-venv --version=3.10.6Wait for any python downloads to complete and finish the interactive poetry setup process.Code! 🎉Inspiration (and why) 🤔Blog Post: Pyenv & Poetry New Project StartOver the past year or so I have found myself referencing this blog post many times to start a new python project.This project is meant to supplant running (most) of these commands manually and to turn it into one CLI utility.# install pyenv on your machinecurlhttps://pyenv.run|bash# install python in pyenvpyenvinstall3.9.5# create virtual environment:pyenvvirtualenv3.9.5hotdog-not-hotdog# set hotdog-not-hotdog as the default virtual environment for the current directorypyenvlocalhotdog-not-hotdog# install poetry in your virtual environmentpipinstallpoetry# initialize projectpoetryinit# install new dependenciespoetryaddnumpy# install dependencies (if a pyproject.toml + poetry.lock already exists for a project)poetryinstallBuild 🛠poetrybuildPublish 📖Note:Remember to update the version inpyproject.tomlwhen publishing a new version.poetrypublish--build--username$PYPI_USERNAME--password$PYPI_PASSWORDFormatting ✨blackpoetry_new_projectLicense 📜This project is licensed under the terms of the MIT license, see MIT - seeLicense file <LICENSE>_.TODO[] - Write test cases (should run inside of Docker container)starting case: base python image, no pyenv etctest case 1: create virtual environmentpoetry-new-project test1 --version 3.9.5test case 2: create same virtual environment and expect failure because it is not forcedpoetry-new-project test1 --version 3.9.5assert failtest case 3: create same virtual environment with force flag and ensure that environment is re-createdpoetry-new-project test1 --version 3.9.5 --forcewrite tox test to test multiple versions of python, especially earlier versions (i.e. 3.5) since the current setting is only 3.9+[] - write CI/CD pipeline[] - create github action to push successfully built project to pypi[] - create github action to run test cases
Package: poetry-optional-cython
Poetry with optional Cython extensionThis is a python packaging example project.InstallationInstall this package withpip install poetry-optional-cython.RunningTry running the installed command:$pocy### Running as compiled extension ###HelloPoetrywithoptionalcythonextension
Calculatingfib(36)14930352The first line of the command output will indicate if the cython extension module
compilation succeeded during installation.