- Python 3.7 or higher
Install dependencies using Poetry.
poetry install
Build.
poetry build
Install.
pip install -e .
Make sure to add the purr
executable to your system's PATH, or you can use it directly from the repository folder.
The general syntax to run a script is:
purr <clump> <script> [script_args]
# Run the 'mirror' script from the 'image' clump with sample.jpg and --east flag
purr image mirror sample.jpg --east
- Open a terminal and navigate to the project directory.
- Activate the Poetry environment.
poetry shell
- Run the application.
python main.py [arguments]
Dependencies are managed via Poetry. To add a new dependency:
poetry add <package_name>
If a script or a clump has specific dependencies, consider creating a separate pyproject.toml
under that clump or script folder for better dependency isolation.
- Create a new folder under the appropriate "clump" inside
./clumps/
. - Add an
entry.py
file, which will serve as the entry point for your script. - Implement your script in
entry.py
.
- clumps/
- image/
- mirror/
- entry.py
import typer
def main(image_path: str, east: bool = typer.Option(False, '--east')):
# Your script logic here
if __name__ == '__main__':
typer.run(main)