Saravanan666/pypi-org huggingface dataset:
Package: django-nats-nkeys
Django Nats NKEYSNATSis an
infrastructure platform for building message-based services.This Django app integratesNAT's multi-tenant account paradigmwithDjango Organizations.The NATSnsctool is used to manage operator, account, and user JWTs.Quick startpip install django-nats-nkeys[drf]Add to your INSTALLED_APPS settings:INSTALLED_APPS = [
    ...
    "organizations",
    "django_extensions",
    "django_nats_nkey",
]Runpython manage.py migrateto create the NATS organizationals
modelsRunpython manage.py nsc-init(optional) Initialize a new NATS
operator. You are responsible for copying the generated.conffile to your NATS server. If you choose to use
an existing operator, you are responsible for runningnsc pullas a pre-deployment step.Contributor's GuideCreate a development environment (requires docker & docker-compose):make docker-up
make nsc-initRun tests and generate a coverage report:make pytestRunblacklinter:make lintSettingsBasic SettingsNATS_NSC_DATA_DIR(default:"/var/lib/nats/nsc/stores"or$NSC_STOREenvironment var)NATS_NSC_CONFIG_DIR(default:"/var/lib/nats/nsc/config"or$NSC_HOMEenvironment var)NATS_NSC_KEYSTORE_DIR(default:"/var/lib/nats/nsc/keys"or$NKEYS_PATHenvironment var)NATS_SERVER_URI(default:"nats://nats:4222")NATS_NKEYS_IMPORT_DIR(default:".nats/", )NATS_NKEYS_EXPORT_DIR(default:".nats/")NATS_NKEYS_OPERATOR_NAME(default:"DjangoOperator")Retry ModeNATS_NSC_RETRY_MODE(default "STRICT", allowed values: "STRICT" or "IDEMPOTENT")InSTRICTmode,django_nats_nkey.errors.NscConflictwill be raised ifnsc add ...command returns an "already exists" error. You are responsible for implementing a separate process to handle eventual consistency between Django models and nsc environment.InIDEMPOTENTmode, conflict is logged at the WARNING level but noExceptionis raised. In this mode,nsc addcommand may be retried many times and will be a no-op if resource already exists.Organization ModelsBased onDjango organizationsAnOrganizationrepresents anaccountinNATS multi-tenant account modelAnApprepresents auserinNATS multi-tenant account modelNATS_ORGANIZATION_MODEL(default:"django_nats_nkeys.NatsOrganization")Must subclassdjango_nats_nkeys.models.NatsOrganizationNATS_ORGANIZATION_OWNER_MODEL(default:"django_nats_nkeys.NatsOrganizationOwner")Must subclassdjango_nats_nkey.models.NatsOrganizationOwnerNATS_ORGANIZATION_APP_MODEL(default:"django_nats_nkey.NatsOrganizationApp")Must subclassdjango_nats_nkey.models.AbstractNatsAppNATS_ORGANIZATION_USER_MODEL(default:"django_nats_nkeys.models.NatsOrganizationUser")Must subclassdjango_nats_nkeys.models.NatsOrganizationUserRobot/Automation ModelsNATS_ROBOT_APP_MODEL(default:"django_nats_nkeys.NatsRobotApp")NATS_ROBOT_ACCOUNT_MODEL(default:"django_nats_nkeys.NatsRobotAccount")App ModelsNATS_APP_MODELS(default:[ "django_nats_nkey.NatsOrganizationApp" , "django_nats_nkeys.NatsRobotApp" ])
Package: django-natural-duration
Expose a duration value to your staff and users in a non-hideous
manner. Allows you to accept input such as “3 days and 2 minutes”
or even “6years,32 min & 503ms”, and optionally renders values
to the user in a similar manner.RequirementsDjango 1.8 (the first one with a duration field)Python 2.7, 3.4, or PyPy (should work with 3.3, but I haven’t tested it)UsageInsert aNaturalDurationFieldinto a form somewhere. Thehuman_valueskwarg  tells whether
to render initial values in a nice, humanized fashion (2 days and 30 minutes) or the usual
django fashion (2 00:30:00). At no point is precision lost when resaved.Other NotesCopyright Jake Merdich, 2015, released under New BSD license.Largely inspired by the [Juration](https://github.com/domchristie/juration) javascript library.
Package: django-naturalsortfield
Better ordering for CharFields. Ignores spaces at
the start of a string, does the right thing with integers. Removes“the”at the start of strings, if you’re usingnaturalsortfield.en.Example:>>> from django.db import models
>>> from naturalsortfield.en import NaturalSortFieldEn
...
>>> class MyModel(models.Model):
...     title = models.CharField(max_length=255)
...     title_sort = NaturalSortFieldEn()
...
>>> MyModel.objects.create(title='XYZ 10')
>>> MyModel.objects.create(title='XYZ 1')
>>> MyModel.objects.create(title='ABC')
>>> MyModel.objects.create(title='The XYZ 2')
>>> [obj.title for obj.title in MyModel.objects.order_by('title_sort')
['ABC', 'XYZ 1', 'The XYZ 2', 'XYZ 10']
Package: django-navbar-client
A Django App to integrate remote Navbar+Oauth  into local user modelsInstallIn order to intall  simply use pippip install django_navbar_clientUsageSimply add django_navbar_client to your settings.py:INSTALLED_APPS=['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles',...'django_navbar_client',...]OAUTH_CLIENT_ID="OAUTH_CLIENT_ID"OAUTH_CLIENT_SECRET="OAUTH_CLIENT_SECRET"OAUTH_SERVER_URL="OAUTH_SERVER_URL"----Thislibraryispartiallyfundedbythe[Waste4Thinkproyect](http://waste4think.eu/)thathasreceivedfundingfromtheEuropeanUnion’s[Horizon2020](https://ec.europa.eu/programmes/horizon2020/)researchandinnovationprogramundergrantagreement688995.Thedisseminationofresultshereinreflectsonlytheauthor’sviewandtheEuropeanCommissionisnotresponsibleforanyusethatmaybemadeoftheinformationitcontains.
Package: django-navbar-client-TEST
A Django App to integrate remote Navbar+Oauth  into local user modelsInstallIn order to intall  simply use pippip install django_navbar_clientUsageSimply add django_navbar_client to your settings.py:INSTALLED_APPS=['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles',...'django_navbar_client',...]OAUTH_CLIENT_ID="OAUTH_CLIENT_ID"OAUTH_CLIENT_SECRET="OAUTH_CLIENT_SECRET"OAUTH_SERVER_URL="OAUTH_SERVER_URL"----Thislibraryispartiallyfundedbythe[Waste4Thinkproyect](http://waste4think.eu/)thathasreceivedfundingfromtheEuropeanUnion’s[Horizon2020](https://ec.europa.eu/programmes/horizon2020/)researchandinnovationprogramundergrantagreement688995.Thedisseminationofresultshereinreflectsonlytheauthor’sviewandtheEuropeanCommissionisnotresponsibleforanyusethatmaybemadeoftheinformationitcontains.
Package: django-navbuilder
Django NavbuilderBuild hierarchical navigation objects from multiple link objectsContentsDjango NavbuilderInstallationUsageBreadcrumbsAuthorsChangelogInstallationInstall or adddjango-navbuilderto your Python path.Addnavbuilderto yourINSTALLED_APPSsetting.Addurl(r'^navbuilder/',include("navbuilder.urls",namespace="navbuilder"))to yoururl patterns(only required if you intend on using the list/detail views)UsageInclude the navbuilder templatetags:{% load navbuilder_tags %}Use the inclusion tag which has been provided:{% render_menu slug %}BreadcrumbsThe breadcrumbs tag tries to render breadcrumbs, based on the current object.
It does this by trying to find a menu item that points to context[“object”],
and then constructs a breadcrumb trail depending on the menu structure.  It
prefers using the structure of the menu designated by slug, but will use any
menu available. Typical use case for this would be if the main menu has an
about/terms page, but it’s mirrored in the footer menu in a much flatter
layout. We prefer the main menu structure. This also allows us to construct
breadcrumbs for items that don’t show up in page menus at all.Inclusion tag usage:{% navbuilder_breadcrumbs slug %}The very specific naming for the tag is used so that it could be used with
other breadcrumb generators as a fallback.AuthorsPraekelt ConsultingJonathan BydendykHedley RoosChangelog0.1Initial release.
Package: django-navhelper
Django template tags to add active class on navigation menusPrerequisitesDjango 4.2Python 3.10InstallationFrom sourcespython setup.py installFrom PyPipip install django-navhelper==1.0Configure your Django installationAddgeelweb.django.navhelperin yourINSTALLED_APPS.Template tagsnavactiveReturns “active” if url name of the current request path is in the list
of view names{% load navactive %}<liclass="{% navactive request "view_nameapp_name:another_view_namenamespace:"%}"><ahref="{% url "view_name"}">Menu Entry</a></li>renavactiveReturns “active” if the pattern is found in the request path{% load navactive %}<liclass="{% renavactive request "^/start_with_foo"%}"><ahref="{% url "view_name"}">Menu Entry</a></li>SettingsYou can customize some options using settingsNAVHELPER_ACTIVE_CLASSDefault: ‘active’The class name for active entriesNAVHELPER_NOT_ACTIVE_CLASSDefault: ‘’ (Empty string)The class name for non-active entriesRun test suiteTo run the test suite, first, create and activate a virtual environment. Then install some requirements and run the tests:pip install Django==4.2
python runtests.py
Package: django-navigation
Django Navigation is a breadcrumbs navigation application for Django Web
Framework. Initially written by Andy Mikhailenko in 2008.
See the file AUTHORS for a complete authors list of this application.Documentation:http://packages.python.org/django-navigation/Please feel free to submit patches, report bugs or request features:http://bitbucket.org/neithere/django-navigation/Django Navigation is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.Django Navigation is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public
License along with this program; see the file COPYING.LESSER. If not,
see <http://www.gnu.org/licenses/>.
Package: django-navigen
# django navigen#### Brandon R. Stoner <monokrome@monokro.me>## What is this?This application provides components that simplify the creation of dynamic navigation menus in django. You can use to to have django automatically generate menus with menu items that reflect the permissions of the currently logged in user.## Getting startedJust like other django apps, django-navigen is really easy to get started with. Simply install it with:python setup.py installAfter this is installed, open up your project's settings.py file and add 'navigen' to your INSTALLED_APPS.INSTALLED_APPS = (# Your other apps listed here'navigen',)Now, as a final step - have django synchronize your database:./manage.py syncdb## How does this work?You should now have all that you need to use django-navigen within your application. In order to test this it is good to know the terminology used by the navigation system or you might be confused or think that the application is overly complicated. However, remember that django-navigen was made with the following goals in mind:* All menus are generated dynamically* Menu items reflect the context of the user, and their related permissions. Users shouldn't see what they can't access.* The application should support as many dynamic menus as required by the design out-of-the-box.* Drop-down menus should be easily created without any extra code.These are established by organizing each menu as a *"navigation tree"*, and relating each tree's top-level *"menu items"* to a navigation tree. A tree is accessed by your template by it's *"access name"*, and multiple trees can make use of the same *"menu item"* when necessary.Trees are represented in django's ORM with the **NavigationTree** model. This model is fairly simple, and only contains the following properties:* name - The human readable name for this specific **NavigationTree** instance.* access_name - The name that will be supplied as a string to access this tree.Leaves in the tree are represented by the **NavigationItem** model which describes a single link that can be assigned to a tree, and can also be assigned to a parent menu item for dropdowns.
Package: django-nav-menu
django-nav-menu is a Django app for creating the simplest menu trees in admin panel.WARNING!!!!This app is tested only with Django >= 1.6.5Quick startYou can install django-nav-menu through pip:pip install django-nav-menuor check out last version from github:https://github.com/renkse/django-nav-menu.gitAdd “menu”, “mptt”, “feincms”, flatpages and sites to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'django.contrib.flatpages',
    'django.contrib.sites',
    'mptt',
    'feincms',
    'menu',
)Runpython manage.py syncdbto create the menu models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a menu (you’ll need the Admin app enabled).You can use it in your context processors or views.Requirementsdjango>=1.6.5, feincms, mptt>=0.6.0
Package: django-navtag
A simple Django template tag to handle navigation item selection.UsageHierarchical navigationUsing a different context variableSetting the text output by the nav variableUsageAdd the app to yourINSTALLED_APPSsetting:INSTALLED_APPS=(# ...'django_navtag',)Give your base template a navigation block something like this:{%loadnavtag%}{%blocknav%}{%navtext' class="selected"'%}<ul class="nav">
    <li{{nav.home}}><a href="/">Home</a></li>
    <li{{nav.about}}><a href="/about/">About</a></li>
</ul>{%endblock%}In your templates, extend the base and set the navigation location:{%extends"base.html"%}{%blocknav%}{%nav"home"%}{{block.super}}{%endblock%}NoteThis works for multiple levels of template inheritance, due to the fact
that only the first{% nav %}call found will change thenavcontext variable.Hierarchical navigationTo create a sub-menu you can check against, simply dot-separate the item:{%nav"about_menu.info"%}This will be pass for both{% if nav.about_menu %}and{% if nav.about_menu.info %}.Using a different context variableBy default, this tag creates anavcontext variable. To use an alternate
context variable name, call{% nav [item] for [var_name] %}:{%blocknav%}{%nav"home"forsidenav%}{{block.super}}{%endblock%}Setting the text output by the nav variableAs shown in the initial example, you can set the text return value of thenavcontext variable. Use the format{% nav text [content] %}. For
example:{%navtext"active"%}<ul>
<li class="{{nav.home}}">Home</li>
<li class="{{nav.contact}}">Contact</li>
</ul>Alternately, you can use boolean comparison of the context variable rather than
text value:<section{%ifnav.home%}class="wide"{%endif%}>If using a different context variable name, use the format{% nav text [content] for [var_name] %}.
Package: django-navtree
This is a django application that provides a hierarchical navigation system.
It takes over the URL naming for the resources that it is charge of, but should
otherwise play nicely with existing projects. It defaults to using
django.contrib.flatpages for the content, but can be linked to any other content.
It can provide tight integration with javascript (jquery), and css for the dropdown
menu, and allows you to set colours/pictures based on nav_item through the django
admin interface.It currently requires the latest development version of Django (from subversion) and
PIL (Python Image Library). It should work with Django 1.2 when that is released.
Package: django-nctu-oauth
# django-nctu-oauthThis package currently still in testing stage## Setup1. Register your app at [nctu oauth website](https://id.nctu.edu.tw/)2. Install package from pip```pip install django-nctu-oauth```3. Add package to django project```NCTU_APP_REDIRECT_URI = 'your-redirect-url'NCTU_APP_CLIENT_ID = 'your-client-id'NCTU_APP_CLIENT_SECRET = 'your-secret-key'INSTALLED_APPS = ['django-nctu-oauth',]```## Testing```python -m test.test```
Package: django-ndarrayfield
django-ndarrayfieldNew Django field to store numpy ndarray.DescriptionStore a numpy n-dimensional array in database (compatible with all database backend).
Use numpy save/load, you can define a shape (not required), and a dtype (default float32).Usageimportnumpyasnpfromdjango.dbimportmodelsfromndarraydjango.fieldsimportNDArrayFieldclassMyModel(models.Model):vec1=NDArrayField(shape=(32,4),dtype=np.float64)date=models.DateTimeField(auto_now_add=True)Parametersdtype: the ndarray dtype (default np.float32)shape: the ndarray shape (default None)binary_serialize: when dump data, serialize to binary (base64) or json lists (default False)WarningThis field type does not replace a static file storage.
The main goal is to store parameter data, results of algorithms and
small and medium machine learning models.
A good indication is the shape of the nd-array. It would be static,
and with a reasonable size. The overrall data size should not exceed 1mb.
For example a field of 300x400 of 2 float32 value ( (300, 400, 2) dtype=float32)
should be a maximum.
Package: django-ndr-core
django-ndr-coredjango-ndr-core is a mini CMS but most of all an access point to research data over apis.
NDR Core helps you create a project website and present your data. It lets you create
pages and add content to them. It also lets you create and manage your own data access
points over different APIs and lets you configure how to present the data and how to make
it searchable.Get StartedFind theDocumentationon ReadTheDocs.settings.pyOpen<project_name>/settings.pyand add the ndr_core module and its dependencies toINSTALLED_APPS:
(Leave the existing settings in place).importosfromndr_core.ndr_settingsimport*[...]INSTALLED_APPS=[[...]]INSTALLED_APPS+=NdrSettings.get_installed_apps()urls.pyOpen<project_name>/urls.pyand add the ndr_core module and its dependencies toINSTALLED_APPS:
(Leave the existing settings in place).fromndr_core.ndr_settingsimportNdrSettings[...]urlpatterns=[[...]]urlpatterns+=NdrSettings.get_urls()Migrate the databaseAfter you have added the django-ndr-core module and its dependencies to your settings and urls,
you can migrate your installation again to create the necessary database tables for your
ndr-core installation.pythonmanage.pymigrate
pythonmanage.pycollectstaticInitialize your NDR Core apppythonmanage.pyinit_ndr_coreStart configuring and entering contentRun your server.pythonmanage.pyrunserverVisithttp://localhost:8000/to view your website andhttp://localhost:8000/ndr_core/to access the configuration interface. The last command runs your server on port 8000.
This is not suitable for production use. You should use a webserver like nginx to serve
your application. See theDocumentationfor more information.
Package: django-neon
A CMS-Application for django-projects.The idea behind django-neon is based on pages and panes.Pagesare used for a hierarchical structure of a website. Hierarchical pages build trees and it is possible to have more than one tree and multiple root-pages in adjango-neon-application.Panesare content-containers storing plain text. These texts can be interpreted bymarkdown,reStructuredTextor in adynamicway.Alsodjango-neoncomes with an integrated Media Database forimagesanddocuments(files for download) and some markup-extensions to access theses images and documents from markdown or reStructuredText.InstallationInstall from PyPipip installdjango-neonor load the sources fromBitbucket.Requirementsdjango-neon is based and tested onPython 3.5+anddjango 1.9+.For using imagesPIL/pillowhave to be installed.Optionalmarkdown,docutilsandpygmentscan be installed. Once installed django-neon use these packages without any further configuration.Documentationwww.django-neon.comLicenseMIT
Package: djangonepal
Django NepalDjangonepal is a Django app that provides information about the administrative bodies of Nepal. Currently it has
the names of seven provinces of Nepal, name of the districts inside each of the provinces and name of all the municipalities
( including Metropolitan, Sub-Metropolitan and rural Municipalities aka Gaun Palika) inside each districts.
Hope this saves your time while working on your web project based project for Nepal.Quick startAfter installing add “djangonepal” and ‘django_extensions’ to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...

    'djangonepal',
    'django_extensions',

    ...
]Runpython manage.py makemigrations djangonepalRunpython manage.py migrateto create the models.Adddjangonepal.context_processors.datato your ‘context_processors’ (optional)‘context_processors’: […‘djangonepal.context_processors.data’…
]Runpython manage.py runscript load_datawait till the import finishes. This import will let
you use the data the way you want.If you followed step 4 you should be able to render it in your template using{% for i in province %}
<p> {{i.name}} </p>
{% endfor %}For district{{i.district}}For VDC/Municipality/Metropolitan/Sub-Metropolitan{{i.municipality}}You could also register the model on your admin.py file withfrom djangonepal.models import *
admin.site.register(Province)
admin.site.register(District)
admin.site.register(Municipality)Want to Contribute?Open to any feedbacks/pull requests. Feel free toPing Me Anytime,
Even if you are not a developer. Any valid resource or data in any format is appreciated. Everyone
will be credited for their  respective contributions.NOTE:Please check the source and published date of data before submitting any kind of information regarding
the package.Future ReleasesMore information about each administrative divisions to be added.Resource Map, Census data to be added.Terrain,flora,fauna data to be added.Rest API to be created and made public.
Package: django-nepali
django-nepaliA django package on top ofnepalipython package which supports nepali date time, time conversion, etc on django projects.Requirementsdjango
nepali >= 1.0.0Installationpip install django-nepaliOnsettings.py, add'django_nepali'to yourINSTALLED_APPS.INSTALLED_APPS=[...'django_nepali',...]Django TemplatesnepalidatetimeIn your Template{%loadnepalidatetime%}nepalinownepalinowrenders the current Nepali date and time in 'en-US' locale (English).For default date format{%nepalinow%}For custom date format{%nepalinow'%Y-%m-%d'%}nepalinow_nenepalinow_nerenders the current Nepali date and time in 'ne' locale (Nepali).For default date format{%nepalinow_ne%}For custom date format{%nepalinow_ne'%Y-%m-%d'%}nepalidatenepalidaterenders the datetime object into nepali datetime format in 'en-US' locale (English).For default date format{{datetime_obj|nepalidate}}For custom date format{{datetime_obj|nepalidate:"%Y-%m-%d"}}nepalidate_nenepalidate_nerenders the datetime object into nepali datetime format in 'ne' locale (Nepali).For default date format{{datetime_obj|nepalidate_ne}}For custom date format{{datetime_obj|nepalidate_ne:"%Y-%m-%d"}}nepalihumanizenepalihumanizerenders the datetime object to a human readable form for 'ne' locale (Nepali){{datetime_obj|nepalihumanize}}Humanize thresholdYou can provide a threshold input, measured in seconds, to thenepalihumanizefilter. If the time difference between the current time and thedatetime_objis greater than the specified threshold, then instead of relative time as provided by the humanize function, thedatetime_objwill be displayed in the specified format (if provided), or else in the default format.{{datetime_obj|nepalihumanize:1000}}nepalinumberIn your Template{%loadnepalinumber%}nepalinumberrenders the english number into nepali format (devanagari){{forloop.counter|nepalinumber}}{{150|nepalinumber}}nepali_commaRenders the given value with commas added in Nepali style without converting the number.{{number|nepali_comma}}This would convert a number such as100000into1,00,000.english_commaRenders the given value with commas added in English style without converting the number.{{number|english_comma}}This would convert a number such as100000into100,000.nepalinumber with commaConverts the number into nepali number and renders it. Basically same as{{ number|nepalinumber|nepali_comma }}{{number|nepalinumber_with_comma}}This would convert a number such as1000into१,०००.