Skip to main content

Inventory

Python module and scripts for inventory software.

Also look at the data in the subdirectory sample-data or a real-life data set (unfortunately private due to not owned images) and the corresponding GUI.

Motivation

In a community-run workshop, e.g. a self-help bike repair workshop, there are a lot of different things stored, a lot more than a newcomer — or a long-time user as well — can memorize. That's why a good sorting system is very helpful. There are limitations to a good physical sorting though:

  1. things can belong to different categories
  2. available space restrictions force us putting small things to each other, breaking association by topic
  3. if you look for the correct place for a thing, you might not know what it is called or what it is good for. Than categories and signs help less.
  4. Newcomers are not able to sort things and clean up the workshop. This tedious task is usually restricted to the people that have been involved for a long time while they are also a bottleneck for a lot of other activity.

There this inventory should help.

  1. Each thing is listed with many names and an "official" name. That way you have higher chances to find your thing and its place if the alternative name you would use intuitively is also listed. This should enable newcomers to independently clean up and learn about the existing things at the same time.
  2. Each label (that is big enough) contains a picture to identify things from outside (intransparent) boxes as well.
  3. Each thing can be found by one of its names alphabetically, by several categories, by English or German name, by looking at pictures in the storage. Not a single categorization to be limited to.

Data

For example data see the directory sample-data or branch Rad i.O. in the data repository or the private data repository if you have access. The data format is a specific directory structure with specific file names:

  • schema.yaml: describes how locations in this workshop are defined. See sample_data for details.
  • preferences.yaml: general options for this data. See sample_data for details.
  • directory things: directory with the actual data. Includes one directory per thing.
  • things/someID/thing.yaml: name, description, ... about one thing. This should be (largely) workshop-independent.
  • things/someID/location.yaml: where this thing is stored in this workshop
  • things/someID/sign.yaml: how the sign on the box for this thing looks in this workshop
  • things/someID/image.*: an image for this thing. Usually workshop-independent.

No keys in things/someID/*yaml are mandatory. Therefore, code that uses the data has to handle missing data.

Install

pip install flinventory

or nix-shell -p 'python312Packages.callPackage (fetchGit "https://codeberg.org/flukx/flinventory") {}')

git clone https://codeberg.org/flukx/flinventory
# install requirements listed in pyproject.toml
# e.g. with
nix-shell

Build

nix-build -E 'let pkgs = import <nixpkgs> {}; in pkgs.python3Packages.callPackage ./default.nix {}'

where you can replace 3 with your preferred python version that is currently available in nixpkgs (e.g. 312).

Dev install

For development, it's useful to run nix-shell in the project root. This creates a symlink .python-env. In PyCharm (and probably other IDEs), you can choose .python-env/bin/python as the Python interpreter, getting access to the packages needed and defined in shell.nix.

To use the command-line interface while being in the nix-shell, run python -m flinventory <command> <data_dir>.

Usage

flinventory is mainly intended as a python module used in the flinventory-GUI. But by installing this module, also the command-line interface flinventory-cli is installed. (It can also be run with the repo and python -m flinventory.)

This command-line interface includes

  • flinventory-cli label for creating signs that can be printed and glued to the boxes. The size and formatting of the signs happens in things/*/sign.json. Also, it creates a list of all names of all things with a reference to their location. For details see the help messages.
  • flinventory-cli {normalize,printed,shortcut,unprinted,useIDs,locationsFile} for various tasks for reformatting the yaml files. This is helpful to have a bit of standardisation to avoid big git diffs when the yaml files are read and written again. For details see the help messages.

Metadata

Release files for flinventory 2.1.7

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

Source distribution (sdist)

Source distribution for flinventory 2.1.7
File Size Uploaded
flinventory-2.1.7.tar.gz 206.2 kB Details

Built distribution (wheel)

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

Total release size: 415.5 kB

Release files / flinventory-2.1.7.tar.gz

Download URL flinventory-2.1.7.tar.gz
Size 206.2 kB
Tags Source
SHA-256 checksum
How to use checksums
79253f8554b48d7596c6b02bbdba27274ddb075e13c864ad106bd3dc4ce22b20
BLAKE2b-256 checksum
How to use checksums
86025dca3c33ae7c0732a5d91a4bf4f7956ae41fd59adc996206291ccc52cfc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.27.0 CPython/3.13.13 Linux/7.1.0

Release files / flinventory-2.1.7-py3-none-any.whl

Download URL flinventory-2.1.7-py3-none-any.whl
Size 209.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95bba865d19a8ca7032a6f186924aa1bbfdb7c4a1e30b09e9bad8baff5d0c06e
BLAKE2b-256 checksum
How to use checksums
7f0e63441e9d78811ec4e86219041fb60f799606cdeeacd6360d0218cb268393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.27.0 CPython/3.13.13 Linux/7.1.0

Release history Release notifications | RSS feed

2.3.2

2 release files

2.3.1

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

This release

2.1.7 This release

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.3

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.1

2 release files

1.1.0

2 release files

0.9.3

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.14

2 release files

0.6.13

2 release files

0.6.12

2 release files

0.6.11

2 release files

0.6.10

2 release files

0.6.9

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

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