Code Monkey home page Code Monkey logo

piton3's Introduction

piton3

PyPI version

Piton3 is a python3 package manager modelled after NPM. Piton3 makes it easier for Python3 developers to share and reuse code. It makes package management simple by doing the following:

  • Install packages locally at python_modules folder

  • Track dependencies in package.json with NodeJS-like semantic versioning

     {
     	"pythonDependencies": {
     		"djangorestframework": "^3.3.3",
     		"django": "^1.9.1"
     	},
     	"pythonDevDependencies": {
     		"django-debug-toolbar": "1.0.0"
     	}
     }
    
  • Automatic management of nested dependencies. Packages that are installed via nested dependency are removed automatically once packages requiring it are removed

  • Simplify unreasonably verbose pip commands such as install --upgrade <package> >> requirements.txt and list --outdated to more human friendly npm-like commands. update, outdated, install --save, etc

screenshots

Future Plans

Our plans are implement all the features mentioned in the docs repo.

Installation

pip install piton3

Use

piton3 <command>

Typical use case

piton3 init //creates a package.json
piton3 install django --save
piton3 install django-debug-toolbar --save

IMPORTANT: ADD python_modules as a python path

  • Method 1:

    Add .python_modules to PYTHONPATH in .bash_profile

    Or use piton3 path --save to do it automatically.

  • Method 2 (more explicit):

    Use the following code at each application entry point:

      def setup_path():
      	import sys
      	import os
      	BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) #OR where the python_modules folder is at
      	sys.path.append(os.path.join(BASE_DIR, "python_modules"))
      setup_path()
    
  • Method 3 (recommended):

    Use piton3 as a task runner:

    1. Define application entry points in package.json under scripts

      {
      	"scripts": {
      		"develop": "python3 manage.py runserver"
      	},
      	"pythonDependencies": {
      		...
      	}
      }
      
    2. Run task with piton3 run <task>

Progress

Command Status
init working
outdated working
install working
remove working
update working
bugs tracker planned
run working
list working
prune working
path working

Piton3 Limitations

Piton3 is all about making package management local. While it replaces Virtualenv, it is not meant to be a repalcement for setuptools.

Piton3 continues to use setuptools, and PYPI in the background, along with very limited use of pip. In future versions the dependency on pip will be removed.

Developers

Piton3 can be run with develop_entry.py without installing.

Deployment:

# Change version number in setup.py
python3 setup.py sdist upload -r pypi
# Amend commit with egg-info

piton3's People

Contributors

looklikeapro avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.