Python and Django Project Utils Package
Project description
Sparky Utils
Utility Package for Python and Django Projects
Reduce your code repetition using fine grained utility package for python and Django projects
Installation
pip install sparky-utils
View all available utility modules
import sparky_utils
print(sparky_utils.list_modules())
['decorators', 'exceptions', 'list_modules', 'response']
User decorator
from sparky_utils import str_meta
"""
will add __str__ method the returns name property if has and id if not and Meta class
def __str__(self):
return self.name or self.id
class Meta:
verbose_name = model_name
verbose_name_plural = model_name + 's'
"""
@str_meta
class FoodCategory(models.Model):
name = models.CharField(max_length=100)
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
sparky_utils-1.0.7.tar.gz
(4.9 kB
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 sparky_utils-1.0.7.tar.gz.
File metadata
- Download URL: sparky_utils-1.0.7.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771cb3f63c874ab70c1162e71d0f42aceea2d5560f9cf47e6797aa8b39f25766
|
|
| MD5 |
34bfdcdf75e6db41b858609201ecdb6c
|
|
| BLAKE2b-256 |
ce49fc6e567b35d9a8b6c24feed06f3db6820bb63308abfdcbda18f8d09321ed
|
File details
Details for the file sparky_utils-1.0.7-py3-none-any.whl.
File metadata
- Download URL: sparky_utils-1.0.7-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db80dc5349d47e3d687d99b07154aa3a0a0e7c0407f827abdffa2c170133a58d
|
|
| MD5 |
c3a6591a0aa9ba74d901dbc3e3c35bac
|
|
| BLAKE2b-256 |
9935b4163e1d54b40af8460112c5a828be37d5786cbd27919f6a169ee3cb75ad
|