Skip to main content

Hightop.py

A nice shortcut for group count queries with Django

Visit.objects.top('browser')
# {
#   'Chrome': 63,
#   'Safari': 50,
#   'Firefox': 34
# }

Build Status

Installation

Run:

pip install hightop

Getting Started

Add a custom manager to the models where you want to use it.

from hightop import HightopQuerySet

class Visit(models.Model):
    objects = HightopQuerySet.as_manager()

And query away

Visit.objects.top('browser')

Options

Limit the results

Visit.objects.top('referring_domain', 10)

Include null values

Visit.objects.top('search_keyword', null=True)

Works with multiple groups

Visit.objects.top(['city', 'browser'])

And expressions

Visit.objects.top(Lower('referring_domain'))

And distinct

Visit.objects.top('city', distinct='user_id')

And min count

Visit.objects.top('city', min=10)

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/hightop.py.git
cd hightop.py
pip install --group dev
pytest

Metadata

Release files for hightop 0.3.0

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

Source distribution (sdist)

Source distribution for hightop 0.3.0
File Size Uploaded Provenance Actions
hightop-0.3.0.tar.gz 4.7 kB Without provenance Details for hightop-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.2 kB

Release files / hightop-0.3.0.tar.gz

Download URL hightop-0.3.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ed46d06c887009a5de16291789dae359428aba8b4411199a128f1b198ebe1227
BLAKE2b-256 checksum
How to use checksums
c6b2991fc7b6e8f3f8fbc29bc3e7fceb99132cfc98aa21dc06d8485db5f4ea15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / hightop-0.3.0-py3-none-any.whl

Download URL hightop-0.3.0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e2b92ac3c76af7bfae15cb0cb1e6f23d235eda9a68b737d160f55963e86d98d
BLAKE2b-256 checksum
How to use checksums
6df741724e88edd92c2798eef61eb27ec5f747f76e45d8aee16dc81ede5169a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for hightop 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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