Skip to main content

Easy Package - for Python Build Status

Python packages - the simple way.

Background

Had to code Python so ended up abstracting out these Python package related utilities to be able to deal with Python packages which is in a sad state in comparison to most other language environments.

Features

  • Easy package setup scripts - because manual Python setup.py scripts breaks "convention of over configuration" principle, as well as a bunch of other software design patterns.

  • Easy package (system) load paths - because package imports and load paths in Python makes adults cry.

  • Easy package tag/release - because package tag/release management should not be done by hand, fallback on conventions.

Install

Install using pip:

pip install easypackage

Usage

How to to make use of easypackage in various ways:

Required

Create a package.json in package root folder (e.g. mypackage) - see Node.js specification, in lack of such for Python.

Easy package setup

In file setup.py in package project root:

import sys

from easypackage import setup as easysetup

easysetup.setup('mypackage', argv = sys.argv)

Your package is now installable using pip et. al. that support the Python packagesetup.py script convention, i.e.:

pip install .

Easy package load paths

In any package source file:

# e.g. `~/dev/projects/mypackage/foo/foo.py`

def hello:
    print('hello!')

In any other package source file:

# e.g. `~/dev/projects/mypackage/bar/bar.py`

from easypackage import syspath as easysyspath

# add `~/dev/projects/mypackage` to Python system path unless already added
easysyspath.syspath()

from mypackage.utils.foo import foo

foo.hello()

And so on.

Easy package tag/release (WIP/TBA)

In file release.py in package project root:

from easypackage import release as easyrelease

easyrelease.release()

To tag/release a new version to Git, simply add/update a valid semver version tag in package.json - according to Node.js specification - and then run python release.py.

Currently not submitted to any Python package register, but will probably be added soon.

License

Released under the MIT license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easypackage-0.1.7.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easypackage-0.1.7-py2-none-any.whl (19.9 kB view details)

Uploaded Python 2

File details

Details for the file easypackage-0.1.7.tar.gz.

File metadata

  • Download URL: easypackage-0.1.7.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for easypackage-0.1.7.tar.gz
Algorithm Hash digest
SHA256 34e8c2b8e889dda8d904fecf8b6aba319ee31bd3a2aa847a09c48b4ed2345ea0
MD5 af175e440af9e25e24461bea95df13b4
BLAKE2b-256 7f6cd8e6a1233dbcb7f2f172d5b44de0b6975b72b62f6951e56ac6286bf57751

See more details on using hashes here.

File details

Details for the file easypackage-0.1.7-py2-none-any.whl.

File metadata

File hashes

Hashes for easypackage-0.1.7-py2-none-any.whl
Algorithm Hash digest
SHA256 c0040f96bd9651addd1d6a76476dd7b1fa45053ad94f4d1a05bcbba4aab163c6
MD5 1562d09f2732242dacd1e6d7c9c27b11
BLAKE2b-256 86d2763c32c4e044dbeac08bd1551f6f64889a951cbce8b42152cf7bb29e6a06

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.8

2 files

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page