Skip to main content

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


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.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

sparky_utils-1.0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file sparky_utils-1.0.1.tar.gz.

File metadata

  • Download URL: sparky_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for sparky_utils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2244abfba8508ef79429a08a30babbb741f98e3882395db255328286bda32a68
MD5 54cc09ff89a689e23093534df8ca7981
BLAKE2b-256 708e7843d90e882ee7fe6208bf70ab9bd3dcd990a608142e8fe2eba677cf1425

See more details on using hashes here.

File details

Details for the file sparky_utils-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sparky_utils-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for sparky_utils-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2750fe86e596b857af1789b2469f15d73a9e7e995c62533eebdc6bf04d629fd5
MD5 e3fc3ba61889359ff768f40b7c111725
BLAKE2b-256 8018452e8130ef8ce3864d6c49c3e1932015fddf6bf08057d5efff28774f4134

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