idae 1.1.0

Creator: bradpython12

Last updated:

Add to Cart

Description:

idae 1.1.0

Idae











A PEP 723 implementation

Usage
Run like normal Python except that the first argument must be a path to the script.
idae example.py

The dependency specification within the Python script must be like the following (example from PEP 723):
#!/usr/bin/env idae
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///

import requests
from rich.pretty import pprint

resp = requests.get("https://peps.python.org/api/peps.json")
data = resp.json()
pprint([(k, v["title"]) for k, v in data.items()][:10])

If you need to pass arguments that look like options for idae to the script you want to run, use the standard UNIX convention of --. For example, let's say you have a script
# script.py
import sys
print(" ".join(sys.argv[1:]))

and you want that script to output I am --help. To run it with Idae, use
idae script.py -- I am --help

Caveats

No logging, or very minimal output reporting

How it works

Detect script file
Detect appropriate Python executable
Use venv to create a temporary virtual environment in the user cache directory using the executable detected
Find PEP 723 pip requirements
Install them into the virtual environment
Run the script within the virtual environment

Run idae clean to remove all cached environments to free up space. Environments are cached per set of requirements.
Installation
You can get this project via pip
$ pip install idae

But we highly recommend you install this project using pipx
$ pipx install idae

Why the name
The scientific name for Pythons is "Pythonidae". I just removed the "Python" and we get "idae".
License
This project is licensed under the GNU GPL v3+.
In short, this means you can do anything with it (distribute, modify, sell) but if you were to publish your changes, you must make the source code and build instructions readily available.
If you are a company using this project and want an exception, email me at thatxliner@gmail.com and we can discuss.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.