Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nxlv/python

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nxlv/python

Custom NX Plugin to support the Python language

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@nxlv/python

This library was generated with Nx.

What is Nx

🔎 Extensible Dev Tools for Monorepos.

What is @nxlv/python

🔎 An Nx Custom Plugin to generate Python projects using Poetry, Tox and a custom dependency tree plugin

Full Nx Monorepo Tools

Getting Started

Add to an existing Nx Workspace

Install the npm dependency

npm install @nxlv/python --save-dev

Usage

Add a new Python Project
nx generate @nxlv/python:project myproject
Options
OptionTypeDescriptionRequiredDefault
--typestringProject type application or librarytrueapplication
--descriptionstringProject descriptionfalse
--directorystringA directory where the project is placedfalse
--packageNamestringPackage nametrue
--publishablebooleanSpeficies if the project is publishable or notfalsetrue
--customSourcebooleanSpeficies if the project uses custom PyPi registryfalsefalse
--sourceNamestringCustom PyPi registry nameonly if the --customSource is true
--sourceUrlstringCustom PyPi registry urlonly if the --customSource is true
--sourceSecondarybooleanCustom PyPi registry secondary flagonly if the --customSource is truetrue
--tagsstringAdd tags to the projectfalse
Add a new dependency to a project
nx run {project}:add --name {projectName} --local
Add an external dependency to the project

To add a new dependency to the project use the nx run {project}:add command detailed below. This ensures that any dependent projects are updated.

nx run {project}:add --name {dependencyName}

Executors

add

The @nxlv/python:add executor handles poetry add command to provide a level of abstraction and control in the monorepo projects.

Features
  • Add new external dependencies
  • Add local dependencies

Both features updates the local workspace dependency tree to keep the lock/venv updated.

Options
OptionTypeDescriptionRequiredDefault
--namestringDependency name (if local dependency use the Nx project name)true
--argsstringCustom args to be used in the poetry add commandfalse
--localbooleanSpecifies if the dependency is localfalse (only if the --name is a local dependency)
update

The @nxlv/python:update executor handles poetry update command to provide a level of abstraction and control in the monorepo projects.

Features
  • Update external dependencies
  • Update local dependencies

Both features updates the local workspace dependency tree to keep the lock/venv updated.

Options
OptionTypeDescriptionRequiredDefault
--namestringDependency name (if local dependency use the Nx project name)false
--argsstringCustom args to be used in the poetry update commandfalse
--localbooleanSpecifies if the dependency is localfalse (only if the --name is a local dependency)
remove

The @nxlv/python:remove executor handles poetry remove command to provide a level of abstraction and control in the monorepo projects.

Features
  • Remove external dependencies
  • Remove local dependencies

Both features updates the local workspace dependency tree to keep the lock/venv updated.

Options
OptionTypeDescriptionRequiredDefault
--namestringDependency name (if local dependency use the Nx project name)true
--argsstringCustom args to be used in the poetry remove commandfalse
--localbooleanSpecifies if the dependency is localfalse (only if the --name is a local dependency)
build

The @nxlv/python:build command handles the sdist and wheel build generation. When the project has local dependencies the executor copies the package/dependencies recursively.

Options
OptionTypeDescriptionRequiredDefault
--silentbooleanHide output textfalsefalse
--outputPathstringOutput path for the python tar/whl filestrue
--keepBuildFolderbooleanKeep build folderfalsefalse
--ignorePathsarrayIgnore folder/files on build processfalse[".venv", ".tox", "tests"]
flake8

The @nxlv/python:flake8 handles the flake8 linting tasks and reporting generator.

Options
OptionTypeDescriptionRequiredDefault
--silentbooleanHide output textfalsefalse
--outputFilestringOutput pylint file pathtrue
install

The @nxlv/python:install handles the poetry install command for a project.

Options
OptionTypeDescriptionRequiredDefault
--silentbooleanHide output textfalsefalse
--argsstringCustom arguments (e.g --group dev)false
--cacheDirstringCustom poetry install cache directoryfalse
--verbosebooleanUse verbose mode in the install poetry install -vvfalsefalse
--debugbooleanUse debug mode in the install poetry install -vvvfalsefalse
tox

The @nxlv/python:tox handles tox executions for a project.

Options
OptionTypeDescriptionRequiredDefault
--silentbooleanHide output textfalsefalse
--argsstringCustom arguments (e.g -e py38)false

FAQs

Package last updated on 01 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc