Utilities

class jangle.utils.StrReprCls[source]

Provides __repr__ showing the object’s module, class name and string representation.

jangle.utils.findattr(obj, path) Optional[Any][source]

This thing is goofy. Don’t use it.

jangle.utils.choice_from_iana(choices: type[django.db.models.enums.TextChoices], string: str) Any[source]

Chooses a Django TextChoices field from text used in the IANA registry.

class jangle.utils.BatchedCreateManager(*args, **kwargs)[source]
batched_create(objs: Iterable, batch_size=64, **kwargs) None[source]

Bulk-creates objects in batches of specified size.

jangle.utils.split_subtags(string: str) list[str][source]

Splits a tag or string of subtags.