Skip to main content

Common PIK Django utils and tools

Project description

pik-django-utils

This project aim is to provide common django project utils and tools for all PIK django projects.

It should provide guidance and tool recommendations for documentation, testing, etc.

This project is a part of django-service-boilerplate.

Versioning

We use semantic versioning MAJOR.MINOR.MAINTENANCE scheme, where the project author increments:

  • MAJOR version when they make incompatible API changes,
  • MINOR version when they add functionality in a backwards-compatible manner, and
  • MAINTENANCE version when they make backwards-compatible bug fixes.

PACKAGES

  • pik.core - Django specific staff
  • pik.libs - Django specific modules and libraries
  • pik.utils - not Django specific small utils and goodness

pik.core

  • pik.core.models - Abstract Django models for common use cases
  • pik.core.tests - Testing helpers
  • pik.core.shortcuts - Django code shortcuts and missed helpers
  • pik.core.cache - Cache helpers

pik.core.models

  • BasePHistorical / BaseHistorical - Base Historical Entity models
  • NullOwned / Owned - Models for user relation
  • SoftDeleted - Soft deletable model

pik.core.tests

  • create_user / get_user - user fixtures

pik.core.shortcuts

  • get_object_or_none(model: Type[models.Model], **search_keys) -> Optional[models.Model]
  • validate_and_create_object(model: Type[models.Model], **kwargs) -> models.Model
  • validate_and_update_object(obj: models.Model, **kwargs) -> Tuple[models.Model, bool]
  • update_or_create_object(model: Type[models.Model], search_keys: Optional[dict] = None, **kwargs) -> Tuple[models.Model, bool, bool]
  • get_current_request() -> Optional[HttpRequest]

pik.libs

...

pik.utils

  • pik.utils.normalization - text normalization helpers

pik.utils.normalization

  • normalize(text: str) -> str
  • company_name_normalization(name: str) -> str

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

pik-django-utils-1.0.11.tar.gz (22.1 kB view details)

Uploaded Source

File details

Details for the file pik-django-utils-1.0.11.tar.gz.

File metadata

  • Download URL: pik-django-utils-1.0.11.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.3

File hashes

Hashes for pik-django-utils-1.0.11.tar.gz
Algorithm Hash digest
SHA256 e42fcb0b2c8bd290ab5f6e432578e7ce23293f52cac5c52b88d7d6ccdd44ab62
MD5 9e3a593f5b84e39297ec3cb93e643264
BLAKE2b-256 ea5f9e5899c0e34a0798d193d9fdfb833cc822b85eb69c708521fee62759763f

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