๐ŸThe nx-python plugin allows users to create a basic python application using nx commands.

Overview

๐Ÿ NxPy: Nx Python plugin

This project was generated using Nx.

The nx-python plugin allows users to create a basic python application using nx commands. To add the plugin to your project, just follow these steps:

Getting started

Create a Nx Workspace

Before installing the nx-python plugin, it is required to have a pre-configured Nx Workspace . If you don't, then proceed to create a new one executing the following command:

npx create-nx-workspace python-workspace --preset=empty --cli=nx --nx-cloud true
cd python-workspace

Install the nx-python plugin

yarn add -D @nx-python/nx-python

Adding an application to our workspace

To create a new python application based on this plugin, please execute the following command:

nx g @nx-python/nx-python:app 
   

   

Note: Replace with the name of your new application

Usage

After creating the application using the nx-python plugin. We can execute the build, lint, test and serve nx commands on this new application. Output will be stored on dist/ / directory.

Building the app

The build command is going to compile all the python files inside directory, using the py_compile native module.

nx build 
   

   

More information here: py_compile

Linting the application

Unfortunately Python doesn't have a native linting module(yet!). nx-python uses the Flake8 module to lint your application. It is required that you install this module beforehand. More info here: Flake8

pip install Flake8

After that you can perform the lint process with:

nx lint 
   

   

Serving the application

This is going to execute the main file in your python application.

nx serve 
   

   

Testing your application

The test command is going to execute all the test units inside your python app. You can add new test unit files if you want, but there are two requirements that you must meet:

  • The filename must include the prefix test
  • Because we are using the native unittest python module to make our tests, you are going to create the tests based on this approach. More info here: unittest

To test your python app, execute the command:

nx test 
   

   

Contributing

๐Ÿ All contributions are welcome. Make sure you follow the code of conduct in this repository.

MIT License

Made with ๐Ÿ’œ by Code ON | Melvin Vega & Diana Rodriguez

You might also like...
Interactive Python interpreter for executing commands within Node.js

Python Interactive Interactive Python interpreter for executing commands within Node.js. This module provides a means of using the Python interactive

Management commands to help backup and restore your project database and media files

Django Database Backup This Django application provides management commands to help backup and restore your project database and media files with vari

A multipurpose discord bot with more than 220 commands

Welcome WM Bot A advanced bot with more than 220 commands to fit your needs Explore the commands ยป View Demo ยท Report Bug ยท Request Feature Table of C

commandpack - A package of modules for working with commands, command packages, files with command packages.
commandpack - A package of modules for working with commands, command packages, files with command packages.

commandpack Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayPal:

Output Analyzer for you terminal commands
Output Analyzer for you terminal commands

Output analyzer (OZER) You can specify a few words inside config.yaml file and specify the color you want to be used. installing: Install command usin

A terminal tool for git. When we use git, do you feel very uncomfortable with too long commands
A terminal tool for git. When we use git, do you feel very uncomfortable with too long commands

PIGIT A terminal tool for git. When we use git, do you feel very uncomfortable with too long commands. For example: git status --short, this project c

โš™ A lightweight command line interface library for creating commands.
โš™ A lightweight command line interface library for creating commands.

โš™ A lightweight command line interface library for creating cli commands. About | Installation | Usage | Features | Contributors | License About Next:

tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

A CLI for advanced management of your notes with simple commands

PyNoteManager This is a CLI for advanced management of your notes with simple co

Releases(v1.0.3)
Owner
StandUP Communications
Online events
StandUP Communications
A selfbot made with DPY, doesn't have much commands but there's some useful commands to use.

Phantom Selfbot A selfbot made in DPY, made by Zenith. How to use Add your token in token = 'YOUR-MOMS-TOKEN-HERE' Change the prefix in prefix = > If

[ฯพโด] ฦตephyr 2 Dec 2, 2021
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple commands.

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple com

null 1 Jan 10, 2022
Linux commands Interpreter for Windows and Mac based systems using Python

DBHTermEcIbP Linux commands Interpreter for Windows and Mac based systems using Python Basic Linux commands supported viewing current working director

Vraj Patel 1 Dec 26, 2021
A Multipurpose bot with many Commands made using Pycord

This repo has all of the commands you will ever need in a discord bot. a Multipurpose discord bot

Pogrammar 42 Dec 18, 2022
WA Terminal is a CLI application that allows us to login and send message with WhatsApp with a single command.

WA Terminal is a CLI application that allows us to login and send message with WhatsApp with a single command.

Aziz Fikri 15 Apr 15, 2022
Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Website

?? rover Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Websit

Saketha Ramanjam 4 Jan 19, 2022
Python commandline tool for remembering linux/terminal commands

ehh Remember linux commands Commandline tool for remembering linux/terminal commands. It stores your favorite commands in ~/ehh.json in your homedir a

null 56 Nov 10, 2022
CLI/GUI Math commands based on python 3

PyMath Commands Syntax Installation Commands: pymath add: usage: pymath add 12.5 12.5 sub: usage: pymath sub 25 12.5 div: usage: pymath div 144 12 mul

eggsnham07 0 Nov 22, 2021