Skip to main content

Make-like build automation tool for Python projects.

Project description

Pyke

(WIP, Beta Release) Make-like build automation tool for Python projects with extensive DSL features.

Features:

  • Users can specify tasks, subtasks, and task rules.
  • Significantly less confusing than Makefiles (is that a tab or space...?)
  • Complete Python DSL with full access to builtins and external dependencies.
  • Run and execute tasks in parallel (multitasking) (task is a recurring theme, huh...).

Example:

import pyke

# create a defualt task, named "build"
@pyke.task("build", default=True)
def build():
    print("Building the project...")

# create a task dependency. running `pyke dist` 
# will make the "build" task run first! 
@pyke.task("dist", deps=["build"])
def dist():
    print("Distributing the project...")

pyke.run()

Put that in a Pykefile and you're good to go. Then run pyke in the same directory and watch the magic happen!

$ pyke dist
Building the project...
Distributing the project...

Installation:

Install the pykefile library with pip. Requires Python 3.8 or higher.

python -m pip install pykefile

You can also add it your developement dependencies with poetry.

python -m poetry add pykefile --dev 

Usage:

Just like any other Makefile, you'll need the Pykefile in your current directory. (Pykefile.py also works)

Then use the pyke command to execute and run specified tasks.

Running pyke without any commands will call the default task if there is one. The first argument will call a task by that name.

Developement:

  1. Fork the repository: Fork
  2. Clone locally (git clone https://github.com/<username>/pyke.git)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -a -m 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request! 🎉

Running locally:

In order to properly test the pyke commands, install the package locally like so:

python -m pip install -e .

You can now use pyke in your terminal, and it will automatically use the latest changes to the source code.

Final Notes:

Pyke is still in beta and I'm open to feature requests or bug reports. Feel free to open an issue! Thanks for checking this project out and I hope it'll make your Python developement process easier!

Project details


Download files

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

Source Distribution

pykefile-0.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

pykefile-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pykefile-0.0.2.tar.gz.

File metadata

  • Download URL: pykefile-0.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pykefile-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d7628d857c9976f1e91571406609db1ceac36dd0bdd31d742bc4fcf7a0cbd17c
MD5 7b5497221de30305c5dc67497bb6712b
BLAKE2b-256 2decc8d0d9698480e3fef002e7f325e69cc40600311578c54d282b5cf82ec83b

See more details on using hashes here.

File details

Details for the file pykefile-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pykefile-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pykefile-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0cf8bd5e812dd09e3f0d5bcf4739e7cb63793961ca19e0272834505a79a52d8
MD5 a936b79c4687fb07111ab460d2bf1f7e
BLAKE2b-256 89c7185a5cdc8dd70c071315f415adff09b8d0a5df21732b46c6eb329af3d6f0

See more details on using hashes here.

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