Skip to main content

Python library and CLI tool to scrape public user statistics from Printables.com

Project description

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

  1. Update the version in pyproject.toml
  2. Commit and push your changes
  3. Create and push a git tag:
    git tag v0.2.0
    git push origin v0.2.0
    
  4. In GitLab, navigate to CI/CD → Pipelines
  5. Manually trigger the release job to publish to PyPI
  6. Verify the package on https://pypi.org/project/printables-stats/

Project details


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.2.0.tar.gz (23.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

printables_stats-0.2.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file printables_stats-0.2.0.tar.gz.

File metadata

  • Download URL: printables_stats-0.2.0.tar.gz
  • Upload date:
  • Size: 23.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for printables_stats-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f57f949441542197aa215793c29edb75698376cfa8fc3bceec20d45d73ec73f0
MD5 73faf77ffed5cac1b89f2d0bfc910b75
BLAKE2b-256 80406f30fa5b69eb7715c6c82d11c26b3daf79eef0ba81de76b3d862d5563fa6

See more details on using hashes here.

File details

Details for the file printables_stats-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for printables_stats-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27bf6ce1cab40400ce659f969274ebbf7982120051de58eb15155a4761af515b
MD5 a1426d4c7440ec379f1b9e68f8183bf3
BLAKE2b-256 0fe51d724f35ee6b0ee6e5161fb6c24c1553bac2d5e978823cd0f19d54a5c58c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page