A Python package for extracting, anonymizing, and analyzing data from FabManager using the Open API.
The project has started as a collection of Python notebooks for reading data from FabManager using APIs. The current version is being developed as a comprehensive package to perform data extraction, anonymization, and analysis tasks.
- ✅ Extract machines data
- ✅ Extract reservations data (with divide-by-type option)
- ✅ Extract trainings data
- ✅ Extract users data
Additional extractions (contributions welcome):
- Extract accounting data
- Extract bookable machines data
- Extract events data
- Extract invoices data
- Extract plan categories data
- Extract plans data
- Extract prices data
- Extract spaces data
- Extract subscriptions data
- Extract user trainings data
Export and clean data from FabManager for publication as Open Data:
- ✅ Clean machine data (filter disabled, create linked data URIs, clean HTML)
- ✅ Clean reservations data (machine and training reservations)
- ✅ Clean trainings data
- ✅ Merge cleaned datasets
Analysis features (contributions welcome):
- Analyze reservations in comparison with trainings data
- Python >= 3.8
- requests >= 2.31.0
pip install git+https://github.com/zumatt/FabManager-Data-Analyzer.gitIt is suggested to create a virtual environment to install the package by doing the following:
On macOS/Linux:
mkdir testFabManagerExport && cd testFabManagerExport && python -m venv venv
source venv/bin/activate
pip install git+https://github.com/zumatt/FabManager-Data-Analyzer.gitOn Windows:
mkdir testFabManagerExport
cd testFabManagerExport
python -m venv venv
venv\Scripts\activate
pip install git+https://github.com/zumatt/FabManager-Data-Analyzer.gitTo use the installed package you can easily select an example and execute it.
Clone the repository and install in editable mode:
git clone https://github.com/zumatt/FabManager-Data-Analyzer.git
cd FabManager-Data-Analyzer
pip install -e ".[dev]"This installs the package in editable mode along with development dependencies including:
- pytest (testing framework)
- pytest-cov (code coverage)
- black (code formatter)
- flake8 (linter)
- mypy (type checker)
- isort (import sorter)
For usage examples, please refer to the examples/ directory, which contains:
extract_machines_example.py- Extract machines data from FabManagerextract_reservations_example.py- Extract reservations dataextract_trainings_example.py- Extract trainings dataextract_users_example.py- Extract users dataclean_machines_example.py- Clean and prepare machine data for Open Data publishingclean_reservations_machine_example.py- Clean machine reservations dataclean_reservations_training_example.py- Clean training reservations dataclean_trainings_example.py- Clean trainings datamerge_cleaned_data_example.py- Merge cleaned datasets
# Format code
black src/ tests/
# Sort imports
isort src/ tests/
# Check code style
flake8 src/ tests/
# Type checking
mypy src/
# For testing examples can be usedImport Errors: Make sure you've installed the package with pip install -e .
Development Tools Not Working: Install development dependencies manually:
pip install black flake8 mypy isort pytest pytest-covFabManager-Data-Analyzer/
├── src/
│ └── fabmanager_data_analyzer_zumat/
│ ├── __init__.py
│ ├── api_client.py
│ ├── utils.py
│ ├── extract_machines.py
│ ├── extract_reservation.py
│ ├── extract_trainings.py
│ ├── extract_users.py
│ ├── clean_machines_data.py
│ ├── clean_reservations_machine.py
│ ├── clean_reservations_training.py
│ ├── clean_trainings_data.py
│ └── merge_cleaned_data.py
├── tests/
├── examples/
│ ├── extract_machines_example.py
│ ├── extract_reservations_example.py
│ ├── extract_trainings_example.py
│ ├── extract_users_example.py
│ ├── clean_machines_example.py
│ ├── clean_reservations_machine_example.py
│ ├── clean_reservations_training_example.py
│ ├── clean_trainings_example.py
│ └── merge_cleaned_data_example.py
├── pyproject.toml
├── README.md
└── LICENSE
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the terms specified in the LICENSE file.
If you use this package in your research, please cite it using the information provided in citation.cff.
- FabManager-Scraping - The original notebook collection that inspired this package
This package has been developed with the assistance of Claude Sonnet 4.5. As a result, you may encounter some unusual behaviors or code repetitions. Contributions to improve code clarity and reduce redundancy are greatly appreciated.