Obtain continuous count.
Project description
django-db-counter
Obtain continuous count.
Install
pip install django-db-counter
Use a shared table to count
from django_db_counter.models import DjangoDBCounter
some_id = DjangoDBCounter.get_next("some_keyword")
Use a dedicated table to count
app/models.py
from django_db_counter.models import DjangoDBCounterBase
class MyCounter(DjangoDBCounterBase):
default_key = "my_counter_keyword" # default to "default"
app/views.py
from app.models import MyCounter
some_id = MyCounter.get_next()
Releases
v0.1.0
- First release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 django-db-counter-0.1.0.tar.gz.
File metadata
- Download URL: django-db-counter-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c860790e87dd00e0256b5305439d643f0c7bab4b3351455939cb6b857557acf9
|
|
| MD5 |
ced000a784c1209325818b3002aa143f
|
|
| BLAKE2b-256 |
710217d3a900b23475a18e16d80f1e8189c5fcd09fcf732ceed80e756d53496e
|
File details
Details for the file django_db_counter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_db_counter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c1dd8437e619800299223e67a661dfcec9f5ffba4f6675dc4279b206aefb3ef
|
|
| MD5 |
cf8d15a65c2b923268c4e29ecea69e69
|
|
| BLAKE2b-256 |
50f58b1a2d52bf4d9e5c0b622dc700b4e1edcdf80def58a0a57240c75bb33078
|