semvec/pypi-packages huggingface dataset:
django-context-variables 0.0.3
Simple utility to help make declarative class-based views in Django
License: MIT

# django-context-variables
Simple utility to help make declarative class-based views in Django


Each method on a CBV decorated with `context_variable` is evaluated once
per instance (==request) by the `get_context_variables` function and added
to the template's context.


##Usage
views.py:

    class MyCBV(TemplateView):
        template_name = "my_template.html"

        def get_context_data(self, **kwargs):
            return get_context_variables(self)

        @context_variable
        def page(self):
            return get_object_or_404(MyModel, self.kwargs.get('page_id'))

        @context_variable
        def page_title(self):
            return '%s - My Site' % self.page.title

my_template.html:

    <html>
        <title>{{ page_title }}</title>
        <body>
            {{ page.content }}
        </body>
    </html>
named-bitfield 0.1.0
Compact representation of fixed width numeric values
License: MIT
Keywords: bitfields bitstrings smart_ids

Overview
========

named_bitfield lets you define fixed width bit fields within an integer, and
address those fields as class attributes, while still providing access to the
backing integer representation.  The original use case for this is
"intellignet IDs".  Essentially, this is a unique numeric id, sutiable for use
as a database primary key, which encodes some information about the object it
identifies.  Obviously, this should be immutable information so your IDs don't
change or (worse) get out of sync with reality.  Some suggestions are the
object type, the create time, or the data source.  Saving a few bits for a
serial counter is also advisable, as timestamps aren't reliable as unique ids.
more_collections 0.3.0
more_collections is a Python library providing more collections (multisets, orderable multisets, hashable dictionaries, ...).
License: MIT
Keywords: collections multiset frozendict development

This package provides some more collections than the standard collections package.

The package currently provides:


- **puredict**/**frozendict** - a functionally **pure** and **immutable dictionary** that is even **hashable**,
  if all keys and values are hashable.
- **multiset**/**frozenmultiset** - a multiset implementation
- **orderable_multiset**/**orderable_frozenmultiset** - a multiset implementation for orderable carriers so that
  multisets of those elements themselves are orderable, even including **nestable_orderable_frozenmultiset**
  which is a multiset-ordering-extension that gives a total ordering for arbitrarily nested multisets over an orderable carrier.


If you want to see any more collections, contact me, open a ticket (I'll happily implement it) or send in a patch.

See https://github.com/maweki/more-collections for a full guide and more information.