Skip to main content

Python package to dynamically read setup configurations and load dependencies.

Project description

License Build Status Python Version Compatibility Version

Pyppyn helps you dynamically read setup configurations and load dependencies.

Since pip is excellent at reading setup configurations and loading dependencies, why Pyppyn? If you need programmatic access to dependency information, for example, in dynamically creating standalone applications using PyInstaller Pyppyn can help you out.

Pyppyn can be used in scripts or using the CLI. Either way, it can be installed easily.

$ pip install pyppyn

CLI

Pyppyn will display help in typical fashion.

$ pyppyn --help

Example

To parse the included test setup.cfg file and install the required dependencies, you can use this command. This allows you to install dependencies without installing the package associated with a given setup.cfg file.

$ pyppyn --setup-file tests/test.cfg --platform linux -v -a
Pyppyn CLI, 0.2.1
[Pyppyn] Verbose mode
[Pyppyn] Platform: linux
[Pyppyn] Setup file: tests/test.cfg
[Pyppyn] Reading config file: tests/test.cfg
[Pyppyn] This Python: 3.6
[Pyppyn] Version from tests/test.cfg : 0.9.4.dev
[Pyppyn] Install Requires:
[Pyppyn]    Generally required: ['backoff', 'click', 'six', 'pyyaml']
[Pyppyn]    For this OS: []
[Pyppyn]    For this Python version: []
[Pyppyn]    Others listed by not required (e.g., wrong platform): ['defusedxml', 'futures', 'pypiwin32', 'wheel']
[Pyppyn] Installed: backoff
[Pyppyn] Imported: backoff
[Pyppyn] Installed: click
[Pyppyn] Imported: click
[Pyppyn] Installed: six
[Pyppyn] Imported: six
[Pyppyn] Installed: pyyaml
[Pyppyn] Imported: yaml

From Python

This is a sample usage of Pyppyn from a Python script.

import pyppyn

# Create an instance
p = pyppyn.ConfigRep(setup_file="tests/test.cfg",verbose=True)

# Load config, install dependencies and import a module from the package
p.process_config()

print("Package requires:", p.this_os_reqs + p.this_python_reqs + p.base_reqs)

Contribute

Pyppyn is hosted on GitHub and is an open source project that welcomes contributions of all kinds from the community.

For more information about contributing, see the contributor guidelines.

Namesake

This module is named in honor of Pippin, a companion, friend, Bichon Frise-Shih Tzu mix. He passed away on March 30, 2018 at the age of 12 after a battle with diabetes, blindness, deafness, and loss of smell. Pleasant to the end, he was a great, great dog.

CHANGE LOG

0.2.2 - 2018.04.13

  • [ENHANCEMENT] Changed format of readme and changelog to RST, and simplified setup.py as a result

0.2.1 - 2018.04.13

Provides these capabilities (in limited form):
  • [ENHANCEMENT] Extract package dependencies from setup.cfg file.

  • [ENHANCEMENT] Determine which dependencies will be needed on the current os/python version.

  • [ENHANCEMENT] Find a module associated with a package.

  • [ENHANCEMENT] Install (and import) dependencies.

0.1.0 - 2018.04.10

  • Initial release!

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

pyppyn-0.2.2.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

pyppyn-0.2.2-py2.py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page