Saravanan666/pypi-org huggingface dataset:
Package: django-ldap
Django LDAPThis library provides LDAP3 integration for Django, its purpose is to
wrap the ldap3 library and provide useful helpers for searching and
manipulating a given directory.This library intends on becoming a full-fledged authentication backend
for Django in coming updates.RequirementsDjango 2.2+Python 3.7+InstallationInstall the library$pipinstalldjango-ldapAdd "django_ldap" to your INSTALLED_APPS settingAdd "django_ldap.backend.LDAPBackend" as an AUTHENTICATION_BACKENDS i.e.AUTHENTICATION_BACKENDS=[# ...'django_ldap.backend.LDAPBackend',# ...]Add the following configuration items to your settings.py as a minimumLDAP_HOST = "LDAP://<LDAP_SERVER_HOSTNAME>:<LDAP_SERVER_PORT>"Additional Configuration ParametersKey NameValue DefaultDescriptionSampleLDAP_HOST"ldap://localhost:389"LDAP Server FDQNLDAP_HOST = "LDAP://localhost:389"LDAP_TLSFalseWhether to enable secure ldap (note, LDAP and appropriate port should be used in hostname i.e. 636)LDAP_TLS = FalseLDAP_TLS_VALIDATEssl.CERT_OPTIONALIf TLS is enabled then the relevant SSL verification code required (either via ssl enum or int)LDAP_TLS_VALIDATE = ssl.CERT_OPTIONALLDAP_TLS_VERSIONssl.PROTOCOL_TLSv1If TLS is enabled then the relevant TLS version must be providedLDAP_TLS_VERSION = FalseLDAP_BIND_USER_DNNoneDN of Auth User (None for anonymous)LDAP_BIND_USER_DN = "cn=admin,dc=example,dc=com"LDAP_BIND_PASSNoneAuth User Password (ignored if user DN is None)LDAP_BIND_PASS = "Foo"LDAP_PAGE_SIZE500Number of elements to return per paged resultLDAP_PAGE_SIZE = 500LDAP_SEARCH_ROOT"dc=example,dc=com"LDAP tree root (Used for search when left as default)LDAP_SEARCH_ROOT = "dc=example,dc=com"LDAP_ENABLE_REF_CACHETrueEnables Referral CacheLDAP_ENABLE_REF_CACHE = TrueLDAP_SET_LDAP3_ARGS{}Allows LDAP3 global parameters to be updated (seeLDAP3 Global Config)LDAP_SET_LDAP3_ARGS = {'SOCKET_SIZE': 4096}LDAP_AUTH_MODENoneNTLM for Active Directory, SASL for external cert or kerberos, leave as None for other cases, ldap3 will auto choose SIMPLE or ANONYMOUS authLDAP_AUTH_MODE = NTLMHow to contributeTBDensure black formatter is used
Package: django-ldap-basic-auth
django-ldap-basic-auth======================Simple middleware that injects the Authorization header in the request after authenticating against a ldap serverIf you use BasicAuthentication in production you must ensure that your API is only available over https. You should also ensure that your API clients will always re-request the username and password at login, and will never store those details to persistent storage.Installation===============You can install django-ldap-basic-auth in 2 ways: using pip or by setup.py install$ pip install django-ldap-basic-authThen modify your settings.pyINSTALLED_APPS = INSTALLED_APPS + ('django_ldap_basic_auth',)AUTHENTICATION_BACKENDS = ('django_ldap_basic_auth.backends.LdapBasicAuthBackend',) + AUTHENTICATION_BACKENDSMIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('django_ldap_basic_auth.middleware.InjectBasicAuthMiddleware',)DJANGO_LDAP_BASIC_AUTH_ACTIVATED = TrueIf you want to store the information in a http cookie, called HTTP_AUTHORIZATION, then put in your settings.py:DJANGO_LDAP_BASIC_AUTH_USE_COOKIES = TrueYou must define a django cache backend too.Dependencies============* Django >= 1.4.x* django-auth-ldap (https://pythonhosted.org/django-auth-ldap/)TODO====* Improve tests* Check if django-auth-ldap is installedCHANGELOG=========* 0.0.1* first version* 0.0.2* including request.session.modified = True to make sure that Django will persist the session* 0.0.3* use http cookie to store data* 0.0.4* check if request has atribute user
Package: django-ldapdb-pyldap
django-ldapdb - support for django models over LDAPCopyright (c) 2009-2011, Bolloré TelecomCopyright (c) 2013, Jeremy Lainé[![Build Status](https://travis-ci.org/jlaine/django-ldapdb.png)](https://travis-ci.org/jlaine/django-ldapdb)About-----_django-ldapdb_ is an LDAP database backend for Django. It allows you tomanipulate LDAP entries using Django's models. Declaring models using theLDAP backend is very straightforward, you simply inherit from_ldapdb.models.Model_ and declare the fields in the same way as for regularmodels. You can even edit the LDAP entries using Django's admin interface._django-ldapdb_ requires Django version 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x,1.7.x or 1.8.x._django-ldapdb_ is distributed under the BSD license, see the LICENSEfile for details. See AUTHORS file for a full list of contributors.Using django-ldapdb-------------------Add the following to your _settings.py_:DATABASES = {...'ldap': {'ENGINE': 'ldapdb.backends.ldap','NAME': 'ldap://ldap.nodomain.org/','USER': 'cn=admin,dc=nodomain,dc=org','PASSWORD': 'some_secret_password',}}DATABASE_ROUTERS = ['ldapdb.router.Router']If you want to access posixGroup entries in your application, you can addsomething like this to your _models.py_:from ldapdb.models.fields import CharField, IntegerField, ListFieldimport ldapdb.modelsclass LdapGroup(ldapdb.models.Model):"""Class for representing an LDAP group entry."""# LDAP meta-database_dn = "ou=groups,dc=nodomain,dc=org"object_classes = ['posixGroup']# posixGroup attributesgid = IntegerField(db_column='gidNumber', unique=True)name = CharField(db_column='cn', max_length=200, primary_key=True)members = ListField(db_column='memberUid')def __str__(self):return self.namedef __unicode__(self):return self.name_Important note_ : you _must_ declare an attribute to be used as the primarykey. This attribute will play a special role, as it will be used to build theRelative Distinguished Name of the entry. For instance in the example above,a group whose cn is _foo_ will have the DN _cn=foo,ou=groups,dc=nodomain,dc=org_.
Package: django-ldaporm
django-ldapormdjango-ldapormprovides  Django ORM-like module that allows you to treat ldap object classes like RDBMS tables.  This
allows you to use Django forms, fields and views natively with ldap models.Installing django-ldapormdjango-ldapormis a pure python package.  As such, it can be installed in the usual python ways.  For the following
instructions, either install it into your global python install, or use a pythonvirtual environmentto install it without polluting your
global python environment.Install via pippip install django-ldapormInstall viasetup.pyDownload a release fromGithub, then:unzip django-ldaporm-1.0.20.zip
cd django-ldaporm-1.0.20
python setup.py installOr:git clone https://github.com/caltechads/django-ldaporm.git
cd django-ldaporm
python setup.py install
Package: django-ldap-sync
django-ldap-sync provides a Django management command that synchronizes LDAP
users and groups from an authoritative server. It performs a one-way
synchronization that creates and/or updates the local Django users and groups.This synchronization is performed each time the management command is run and
can be fired manually on demand, via an automatic cron script or as a periodicCelerytask.QuickstartInstall the application:pip install django-ldap-syncAppend it to the installed apps:INSTALLED_APPS = (
    # ...
    'ldap_sync',
)Configure the requiredsettings.Run the synchronization management command:manage.py syncldapFor more information on installation and configuration, see the included
documentation or read the documentation online atdjango-ldap-sync.readthedocs.org.
Package: django-ldap-user-registration
A Django web app that provides user registration and password
reset to an LDAP server.FeaturesUser self registration with email account activationUser self password reset (typical email reset workflow)Created by:KENET Research ServicesHome pagehttps://www.kenet.or.ke/research-servicesSource codehttps://github.com/KENET-KE/django-ldap-user-registrationDocumentationhttp://django-ldap-user-registration.readthedocs.io/en/latest/Motivation for developmentHaving been involved with the setup of Identity Providers which use open LDAP as the authentication backend, I am yet to
come across a FOSS solution for signing up users that provides a way for them to reset their passwords on their own.
This has been a pain point when setting up identity providers because the only alternative an admin has is to login to
the backend and manually reset their passwords.
There is a commercial solution (ldap-account-manager) which I haven’t tried and that is my main motivation to build an
open solution. I haven’t bothered with building an interface to manage LDAP since that already exists and I recommend
phpldapadmin (FOSS) for that.
Package: djangoldp-blog
djangoldp_blogInstallationHow to install the project locally1- create virtual environementpython -m venv venv2- activate venvvenv\Scripts\activate.bat3- update pip & wheelpython -m pip install -U pip wheel4- install djangoldp V2pip install djangoldp5- init serverdjangoldp initserver [SERVER NAME]7- update settings.yml
dependencies:django-tinymceldppackages:djangoldp_blog8- create a virtual link in sibserver :
ln -s ../djangoldp-blog/djangoldp_blog djangoldp_blog9- install the server in sibserver:djangoldp install10- install all packagesdjangoldp configure11- create rsa keypython manage.py creatersakey12- launch the serverdjangoldp runservercongrats ! You've made it. :)It should be ok.
Package: djangoldp-editor
Django LDP editorContextThe goal of this repository is to make available to all of our models a editor feature, covering the editor action, diseditor action, and count of both use cases.The editor Model will be related to an IDURLField targetting users/ so that we will be able to relate the users and their editors in a distributed world.Would ideally be implemented in a way which makes it compatible with theActivityPub editor ActivityAdd your package in settings.py of the app. Now, you can test if your package is imported propefully by doing apython manage.py shellthen
from djangoldp_myawesomepackage.models import ExampleModelIf, no error, it's working.PlanningMake it work:Being able to post a editor, a diseditor.
Being able to retrieve the count of editors and diseditors for a given resource
Being able to do that on the federation instance bearing the current user identityMake it cleanTest it in the context of the federation
Ensure we stay compliant with the activityPub specificationCICDWhen you're ready to publish your app :Add thesib-deployuser as amaintainerto the project (Settings > Members)Configurepipeline strategytoclone(Settings > CI/CD > Pipelines)Protect themasterbranch allowing onlymaintainersto push (Settings > Repository > Protected branches)Configure CI/CD variables to authenticate on pypi.org:VariableValueProtectionGL_TOKENsib-deploy-tokenprotectedPYPI_PASSWORDpypi-passwordprotectedPYPI_USERNAMEstartinbloxprotectedReplace the "do_not_publish" by "master" in the .gitlab-ci.ymlFactoriesIf you dont need factory, you can remove the mock_example command, the factories files and the extras_require section in setup.cfgProvide a factory is a good pratice in order to simplify the mocking of data on a server / in a test pipeline.Contribute !As the Startin'Blox project is evolving a lot and quickly, we're going to need to update this demo regularly!
For any suggestion, you can open an issue or contact the last person who updated it:alice@startinblox.comThanks!
Package: djangoldp-energiepartagee
djangoldp_energiepartageeInstallationHow to install the project locally1- create virtual environementpy -m venv venv2- activate venvvenv\Scripts\activate.bat3- update pip & wheelpy -m pip install -U pip wheel4- install sib-managerpy -m pip install -U sib-manager5- launch the startproject commandsib startproject energiepartagee_server6- install server
=> go into energiepartagee_server foldersib install server7- create superuserpy manage.py createsuperuser8- add virtual link with the djangoldp_energiepartagee package :mklink /D [LINK] [TARGET]mklink /D [...]\energiepartage_server\djangoldp_energiepartagee [...]\djangoldp_energiepartagee\djangoldp_energiepartagee=><!> [LINK] : Link to the "folder" where the target will be found9- add the package in the package.yml file10- run migration and migratepy manage.py makemigrations djangoldp_energiepartagee(for the first time, thenpy manage.py makemigrationswill be enough in case ogf modifications of the package)py manage.py migrate11- runserverpy manage.py runserverCustom CommandsWithdjangoldp_energiepartageeinstalled as an app, you will be able to run:python manage.py create_annual_contributionsThis command calculates the contribution for every actor in the database and creates a Contribution for each. The amount is calculated following an algorithm which can be found in theActormodel (Actor.get_next_contribution_amount). A contribution will not be added for any actors which have already paid a contribution in the same year. Use the-Foption to override this, creating one contribution for every actor in the databae.
Package: djangoldp-hiphopcommunity
djangoldp_hiphopcommunityInstallationHow to install the project locally1- create virtual environementpython -m venv venv2- activate venvvenv\Scripts\activate.bat3- update pip & wheelpython -m pip install -U pip wheel4- install djangoldp V2pip install djangoldp5- init serverdjangoldp initserver [SERVER NAME]7- update settings.yml
dependencies:djangoldp-accountdjangoldp-uploaderdjango-tinymcedj-stripeldppackages:djangoldp_stripedjangoldp_accountdjangoldp_uploaderdjangoldp_blogdjangoldp_hiphopcommunity8- create a virtual link in sibserver :
ln -s ../djangoldp-hiphopcommunity/djangoldp_hiphopcommunity djangoldp_hiphopcommunity9- install the server in sibserver:djangoldp install10- install all packagesdjangoldp configure11- create rsa keypython manage.py creatersakey12- launch the serverdjangoldp runservercongrats ! You've made it. :)This is great.
Package: djangoldp-i18n
# I18nLDPViewSetI18nLDPViewSet overrides DjangoLDP’s LDPViewSet to provide serialization using the I18nLDPSerializer, instead of the default LDPSerializerYou can activate the custom functionality on your DjangoLDP Model by settingview_setin the Model.Meta:https://git.startinblox.com/djangoldp-packages/djangoldp#view_set## Client-SideIf you are using Startin’Blox in your client application, please see the [Startin’Blox docs](https://docs.startinblox.com)If you are writing your own client, a full how-to for requesting from the DjangoLDP viewset is out of the scope of this package README, but the adjustments needed to include a requested language are simple:
* for GET requests, simply set theAccept-Languageheader, following the [HTTP spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language)
* for POST requests it is easiest to do the same. For information, it is also possible to submit the langauge in [JSON-LD value-object syntax](https://www.w3.org/TR/json-ld/#value-objects), but the _response_ will be serialized into the HTTP-requested languageBoth GET and POST requests currently only accommodate serialization in one language per-request. In POST requests this means that you cannot POST multiple language at the same time# I18nLDPSerializerThe main functionality of I18n is provided in the serializer, which overrides DjangoLDP’s LDPSerializer to select the activated language content and display this in the context of the responseThe language is selected and the data manipulated automatically, based on the request object in the serializer context. A feature to provide the serialization into a language using a setting (without a request object) is TODO# DjangoLDPI18nAdminThis admin class simply inherits fromDjangoLDPAdminfrom DjangoLDP andTranslationAdminfrom [Django-Modeltranslation](https://django-modeltranslation.readthedocs.io/en/latest/admin.html) to provide the features from both. It does so without additions
Package: djangoldp-like
Django LDP LikeContextThe goal of this repository is to make available to all of our models a Like feature, covering the like action, dislike action, and count of both use cases.The like Model will be related to an IDURLField targetting users/ so that we will be able to relate the users and their likes in a distributed world.Would ideally be implemented in a way which makes it compatible with theActivityPub Like ActivityAdd your package in settings.py of the app. Now, you can test if your package is imported propefully by doing apython manage.py shellthen
from djangoldp_myawesomepackage.models import ExampleModelIf, no error, it's working.PlanningMake it work:Being able to post a like, a dislike.
Being able to retrieve the count of likes and dislikes for a given resource
Being able to do that on the federation instance bearing the current user identityMake it cleanTest it in the context of the federation
Ensure we stay compliant with the activityPub specificationCICDWhen you're ready to publish your app :Add thesib-deployuser as amaintainerto the project (Settings > Members)Configurepipeline strategytoclone(Settings > CI/CD > Pipelines)Protect themasterbranch allowing onlymaintainersto push (Settings > Repository > Protected branches)Configure CI/CD variables to authenticate on pypi.org:VariableValueProtectionGL_TOKENsib-deploy-tokenprotectedPYPI_PASSWORDpypi-passwordprotectedPYPI_USERNAMEstartinbloxprotectedReplace the "do_not_publish" by "master" in the .gitlab-ci.ymlFactoriesIf you dont need factory, you can remove the mock_example command, the factories files and the extras_require section in setup.cfgProvide a factory is a good pratice in order to simplify the mocking of data on a server / in a test pipeline.
Package: django-leaderboard
A Django leaderboard (scoreboard) app, using redis as its backend. This app is a wrapper for the python-leaderboard apihttps://github.com/agoragames/python-leaderboardThe app uses Redis KVS for its back-end and stores the scores on its ‘sorted set’ data structure, which keeps the data ordered and allows us to retrieve, update and delete scores efficiently.With this app, you can get the leaderboard with pagination, create scores, update or delete them. Even get rankings around the given score.FeaturesRESTful api for creating, updating, deleting and retrieving high scores or scores around the userStandard view for displaying high scores with paginationNot implemented featuresdelete method for the apiRequirementsPython leaderboards modulepip install leaderboard, note that this module will install redis and hiredis modules as its dependancy
djangorestframeworkpip install djangorestframeworkfor providing the rest behavior.InstallationAdd thedjango_leaderboardfolder to your path.Adddjango_leaderboardto APPS list in settings.pyMake sure that your redis server is running.Add following lines to your urls.py file.Runpython manage.py runserverto test it out.url(r’^leaderboard/’, include(‘django_leaderboard.urls’)),
# auth support for rest framework
url(r’^restframework’, include(‘djangorestframework.urls’, namespace=’djangorestframework’))UsageThanks todjangorestframeword, you can just visithttp://localhost:8000/leaderboard/api/<game-identifier>/to create, update or get the leaderboard.Other urls arehttp://localhost:8000/leaderboard/api/<game-identifier>/user/<user-id>/for scores around the user, andhttp://localhost:8000/leaderboard/api/<game-identifier>/<page-id>/for pagination. Please seeurls.pyto see the full list or urls.To create new ranking using the api, send a POST request tohttp://localhost:8000/leaderboard/api/<game-identifier>/. Game identifier is the key to determine your game to the system. it can be anything. Parameters areuser_id`and `score.
To see the html table of leaderboard, go tohttp://localhost:8000/leaderboard/highscores/<game-identifier>/page.ExampleThere is an example project in the source to make it easy to start.ContributionsPlease feel free to contribute.
Package: django-leads
An easy, functional and customizable lead page for your next big thing, ready to use in your django project.DocumentationThe full documentation is athttp://django-leads.rtfd.org.QuickstartInstall django-leads$pipinstalldjango-leads# Also auto installs all needed dependencies! :)Or get the bleeding-edge version:$pipinstallhttps://github.com/dnmellen/django-leads/archive/master.zipSettingsINSTALLED_APPS=(...'floppyforms','crispy_forms','leads',)...CRISPY_TEMPLATE_PACK='bootstrap3'urls.py...importleads.urlsurlpatterns=patterns('',...url(r'^admin/',include(admin.site.urls)),url(r'^',include(leads.urls,namespace='leads')),)Final touch$pythonmanage.pysyncdbFeaturesWorks on Python 2.6, 2.7, 3.3Basic lead page to act as a placeholder for your django projectRegisters user’s name and email into databaseCustomizable and extendable models and formsAdmin interfaceExport registered users to CSVSend newsletters to your usersHistory0.1.0 (2013-11-08)First release on PyPI.0.1.1 (2013-11-10)Makes this app more extendable by using custom models and forms0.1.2 (2013-12-04)Exports registered users to CSV from admin panelCreate newsletters from admin panelFixed installation from pip0.1.3 (2013-12-04)Bugfixed circular imports when setting custom Forms0.1.4 (2014-02-26)Changed default bootstrap theme
Package: django-leafage
Django LeafageDescriptionSimple and Easiest paginator for Django.Installationpip install django-leafageQuick startAdd "leafage" to your INSTALLED_APPS in settings.py like this::INSTALLED_APPS = [
    ...
    'leafage',
    ...
]Ensure "APP_DIRS" to "True" in settings.py like this::TEMPLATES = [
    {
        ...
        'DIRS': [],
        'APP_DIRS': True,
        ...
    },
]In viewsimport leafagelike this::import leafage

def home(request):
"""
    Home page handler.
"""
template = 'home.html'

per_page_obj = 10 # default = 10(if not provided)

queryset = Model.objects.all()
queryset = leafage.pagination(request=request, obj_list=queryset, obj_count=per_page_obj)

context = {
    'queryset': queryset
}
return render(request, template, context)At beginning of template include following code and template look like this::{% load leafage %}End of template add following code look like this::{% paginate request=request object_list=queryset %}LicenceCopyright (c) 2020 Nilesh Kumar DubeyThis repository is licensed under the MIT license.
See LICENSE for details
Package: django-leaflet-gpx
Simple Django application to include LeafletJS map and display GPX file.Not documented yet :-/ConfigurationThis is an example of custom configurationimport os

STATIC_URL = '/static'
LEAFLET_GPX_ICONS = {
    'markerIcon': {
        'iconUrl': os.path.join(STATIC_URL, 'icons/my-custom-marker.png'),
        'iconSize': [32, 32],
        'iconAnchor': [5, 31],
    }
}LEAFLET_GPX_ICONSThere are three editable icons:markerIcon: markers pointsstartIcon: GPX start pointendIcon: GPX end pointThe icon options are the same as those for creating an icon in the Leaflet-JS library.Here is a link to the documentation:https://leafletjs.com/reference-1.5.0.html#icon
Package: django-leaflet-storage
[![Build Status](https://travis-ci.org/umap-project/django-leaflet-storage.svg)](https://travis-ci.org/umap-project/django-leaflet-storage)[![Requirements Status](https://requires.io/github/umap-project/django-leaflet-storage/requirements.svg?branch=master)](https://requires.io/github/umap-project/django-leaflet-storage/requirements/?branch=master)# Django-Leaflet-StorageProvide collaborative maps for your Django project.Django-Leaflet-Storage is a backend for [Leaflet.Storage](https://github.com/yohanboniface/Leaflet.Storage), built on top of [Geodjango](http://geodjango.org/) and [Leaflet](http://leafletjs.com).Check the demo [here](http://umap.fluv.io)## InstallationYou will need a geo aware database. See [Geodjango doc](https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/) for backend installation.Then you can pip install the app:pip install django-leaflet-storageAdd `leaflet_storage` to you apps:INSTALLED_APPS = (..."leaflet_storage",)Include `leaflet_storage` urls:(r'', include('leaflet_storage.urls')),Create tables:python manage.py migrate## Basic usageFrom the Django admin (for now), you need to create at least:- one TileLayer instance- one Licence instanceThen, go to the map creation page (something like http://localhost:8017/map/new), and you will be able to add features (Marker, Polygon...).