Printables Stats Scraper
A Python library and CLI tool to scrape public user statistics from Printables.com, including detailed badge levels.
Features
- Public Stats: Fetches downloads, likes, followers, following, joined date, and model count.
- Detailed Badges: Parses badges into a dictionary of
{Name: Level}(e.g.,{'Designer': 1, 'Maker': 4}).
Installation
From PyPI
pip install printables-stats
From Source
This project uses uv for dependency management.
# Clone the repository
git clone https://gitlab.com/yourusername/printables-stats.git
cd printables-stats
# Install dependencies
uv sync
Usage
CLI
You can use the included script to fetch stats for a specific user.
uv run python -m printables_stats @josefprusa
Output Example:
{
"downloads": 4,
"likes": 1,
"followers": 0,
"following": 4,
"joined_date": "November 6, 2025",
"models_count": 4,
"badges": {
"Designer": 1,
"Maker": 4,
"Download Maniac": 3,
"Printables Maniac": 1
}
}
Library
from printables_stats import PrintablesClient
client = PrintablesClient()
stats = client.get_user_stats('@josefprusa')
if stats:
print(f"Downloads: {stats.get('downloads')}")
print(f"Badges: {stats.get('badges')}")
Development
Run quality checks and tests:
uv run ruff check .
uv run ruff format .
uv run ty check .
uv run pytest
Releasing to PyPI
Release Process
- Update the version in
pyproject.toml - Commit and push your changes
- Create and push a git tag:
git tag v0.2.0 git push origin v0.2.0
- In GitLab, navigate to CI/CD → Pipelines
- Manually trigger the
releasejob to publish to PyPI - Verify the package on https://pypi.org/project/printables-stats/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
printables_stats-0.3.0.tar.gz
(27.6 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file printables_stats-0.3.0.tar.gz.
File metadata
- Download URL: printables_stats-0.3.0.tar.gz
- Upload date:
- Size: 27.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cb1572ee1e572766971e95385da2f2f777ec7b16ec5e97ec473dc51202b9451
|
|
| MD5 |
9768bbcc54f1f4c74fffbea33abc3551
|
|
| BLAKE2b-256 |
c80ad0a79ba7d1bedd37ea2377b993d7fa4a2119a7bd2c4e3deb23b564bd8aff
|
File details
Details for the file printables_stats-0.3.0-py3-none-any.whl.
File metadata
- Download URL: printables_stats-0.3.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
089fd89566428c8e05518fd5cc5d0855104f1e361bbc553b7c5ef5eec1fd336e
|
|
| MD5 |
1bc61392bd50ea11e907e685b3a31837
|
|
| BLAKE2b-256 |
b49ca4bbcc73e1d6067cae0631013a52dffc10926506efe36827c105e6583bcf
|