Skip to content

Getting started

Joel B edited this page May 12, 2026 · 3 revisions

This page explains how to set up Pynventory on your computer.

Requirements

You need:

  • Python 3.8 or newer
  • Git
  • access to the Pynventory repository
  • a terminal or command prompt

If you are new to Python or Git, see the Useful links page.

Check your installed versions:

python --version
git --version

You should see installed version numbers for Python and Git.

If python does not work, try:

python3 --version

Clone the repository

git clone https://github.com/blomma-dev/pynventory.git
cd pynventory

Run the commands in this guide from the repository root.

Project structure

  • pynventory/ - Python package with the app code
  • data/ - local runtime data (gitignored except .gitkeep)
  • tests/ - test package
  • .github/ - issue templates, PR template, workflows
  • README.md, requirements.txt, ruff.toml, .gitignore - project files

Create a virtual environment

python -m venv .venv

If python does not work, try:

python3 -m venv .venv

Activate the virtual environment

On Linux or macOS:

source .venv/bin/activate

On Windows PowerShell:

.venv\Scripts\Activate.ps1

If PowerShell blocks activation, run PowerShell as administrator and enter:

set-executionpolicy remotesigned

On Windows Command Prompt:

.venv\Scripts\activate.bat

When active, your terminal usually shows (.venv) near the prompt.

Install requirements

pip install -r requirements.txt

This installs Ruff for formatting and linting. The command should finish without errors.

Run the app

python -m pynventory.main

You should see the terminal app start and accept commands like help. Useful commands inside the app:

  • help - show available commands
  • add - add a product
  • list - show all products
  • mod - modify a product
  • del - delete a product
  • exit - close the app

Run Ruff

Before opening a pull request:

ruff check .
ruff format .

If ruff check . prints no issues or says all checks passed, the check is okay.

Only format files that are part of your change.

Database note

The app uses SQLite at data/products.db. This file contains local development data and must never be committed. If it appears in git status, leave it unstaged. See Troubleshooting for help.


Next step

Ready to make your first change? Continue to Your first contribution.

Clone this wiki locally