Skip to main content

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.
  • Use regex rules patterns to create targets for tasks.
  • Significantly less confusing than Makefiles (is that a tab or space...?)
  • Complete Python DSL with full access to builtins and external dependencies.
  • [WIP] Run and execute tasks in parallel with each other (threaded multitasking).

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! 🎉

Local Developement:

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.

Use bash bin/build to build the project. bash bin/docs will update and start the documentation server locally.

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!

Metadata

Release files for pykefile 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pykefile 0.0.4
File Size Uploaded
pykefile-0.0.4.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pykefile 0.0.4
File Interpreter ABI Platform
pykefile-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / pykefile-0.0.4.tar.gz

Download URL pykefile-0.0.4.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
99502daa51f6e241ff7daefc1c72fe9d3c1646e69437a28e6f9b9897c3ac7fc2
BLAKE2b-256 checksum
How to use checksums
a8bda5c6d2b523c9b8269ae98d7712a14f8b1d9b023b99d782d7f252260186ad
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pykefile-0.0.4-py3-none-any.whl

Download URL pykefile-0.0.4-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84f764947cabdd840119f4ff73e71fb7890bdc5791b602ff927e3055ad08ce63
BLAKE2b-256 checksum
How to use checksums
88a9d17a752d3c050a828bc2b7bba30cf49b2ce7e2f8e047001e288761c3c8d6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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