Saravanan666/pypi-org huggingface dataset:
Package: django-hoptoad
django-hoptoad is some simple Middleware for letting [Django][]-driven websites report their
errors to [Hoptoad][].  Now [ponies][] can ride the toad too.[Django]:http://djangoproject.com/[Hoptoad]:http://hoptoadapp.com/[ponies]:http://djangopony.com/Requirementsdjango-hoptoad requires:[Python][] 2.5+ (preferably 2.6+ as that’s what I’ve tested it with)[PyYAML][] (pip install pyyamloreasy_install pyyaml)[Django][] 1.0+A [Hoptoad][] account[Python]:http://python.org/[PyYAML]:http://pyyaml.org/InstallationGrab the the django-hoptoad code by cloning the [Mercurial][] repository (or just [download the
latest version][tip-dl] and unzip it somewhere):hg clonehttp://bitbucket.org/sjl/django-hoptoad/There’s a git mirror too if youreallywant it.git clone git://github.com/sjl/django-hoptoad.gitOnce you download it, you can install it in the usual manner:cd django-hoptoad
python setup.py installIf you’d prefer to be able to update at any time by pulling down changes with Mercurial or git, you
can symlink the module into yoursite-packagesdirectory instead of usingpython setup.py install:ln -s /full/path/to/django-hoptoad/hoptoad /full/path/to/site-packages/To make sure it works you can run:python -c ‘import hoptoad’[Mercurial]:http://mercurial.selenic.com/[tip-dl]:http://bitbucket.org/sjl/django-hoptoad/get/tip.zipUsageTo set up a Django project to notify Hoptoad of its errors, you need to do two things in itssettings.pyfile.First, add theHoptoadNotifierMiddlewareas the last item in theMIDDLEWARE_CLASSESsetting:MIDDLEWARE_CLASSES = (
# … other middleware classes …
‘hoptoad.middleware.HoptoadNotifierMiddleware’,
)Next, you’ll need to add aHOPTOAD_API_KEYsetting.  You can get the key from the Hoptoad
project page.HOPTOAD_API_KEY = ‘Your Hoptoad API key.’DocumentationThe documentation for django-hoptoad is at the [project page][project].  There’s a [Quick Start
guide][quickstart], [Configuration guide][config], [Troubleshooting guide][troubleshooting], and a few
other things there.The documentation is stored in thedocs/directory of the repository if you prefer to read it
offline.[project]:http://sjl.bitbucket.org/django-hoptoad/[quickstart]:http://sjl.bitbucket.org/django-hoptoad/quickstart/[config]:http://sjl.bitbucket.org/django-hoptoad/config/[troubleshooting]:http://sjl.bitbucket.org/django-hoptoad/troubleshooting/SuggestionsThis Middleware is a work in progress.  If you have a suggestion or find a bug please [add an
issue][issues] and let me know.[issues]:http://bitbucket.org/sjl/django-hoptoad/issues/?status=new&status=open
Package: django-hordak
Double entry bookkeeping in Django.Django Hordak provides asimple model layerfor a double-entry accounting
system. The intention is not to provide a full-featured app, but rather
to provide a reliable foundation on which to build such apps.Tested under Python: 3.8, 3.9, 3.10, 3.11, 3.12
Django: 4.2, 5.0DocumentationDocumentation can be found at:http://django-hordak.readthedocs.io/Related ProjectsDjango Hordak is the core functionality of a double entry accounting system.
It provides thoroughly tested core models with relational integrity constrains
to ensure consistency.Interfaces which build on Hordak include:battlecat– General purpose accounting interface (work in progress)swiftwind– Accounting for communal households (work in progress)django-hordak is packaged usingseed.
Package: django-horizon
Django HorizonPurposeSimple database sharding (horizontal partitioning) library for Django applications.Free software: MIT licenseDocumentation:https://django-horizon.readthedocs.io.Inspired bydjango-sharding. Thank you so much for your cool solution :)FeaturesShard (horizontal partitioning) by someForeignKeyfield like user account.InstallationTo install Django Horizon, run this command in your terminal:$pipinstalldjango-horizonThis is the preferred method to install Django Horizon, as it will always install the most recent stable release.If you don’t havepipinstalled, thisPython installation guidecan guide
you through the process.UsageSetupAdd database router configuration in yoursettings.py:Horizontal database groups and a metadata storeHORIZONTAL_CONFIG={'GROUPS':{'group1':{# The name of database horizontal partitioning group'DATABASES':{1:{'write':'member1-primary','read':['member1-replica-1','member1-replica-2'],# Pick randomly by router},2:{'write':'member2-primary','read':['member2-replica'],},3:{'write':'a3',# Used by 'read' too},},'PICKABLES':[2,3],# Group member keys to pick new database},},'METADATA_MODEL':'app.HorizontalMetadata',# Metadata store for horizontal partition key and there database}Database routerDATABASE_ROUTERS=('horizon.routers.HorizontalRouter',...)Example modelsHorizontal partitioning by userMetadata storefromhorizon.modelsimportAbstractHorizontalMetadataclassHorizontalMetadata(AbstractHorizontalMetadata):passIn the example, metadata store save followings.group: Group name for horizontal partitioning.key: Determines the distribution of the table’s records among the horizontal partitioning group.index: Choosed database index in horizontal partitioning groups.Sharded modelfromdjango.confimportsettingsfromhorizon.managerimportHorizontalManager# For Django<1.10fromhorizon.modelsimportAbstractHorizontalModelclassSomeLargeModel(AbstractHorizontalModel):user=models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.DO_NOTHING,db_constraint=False,# May be using anothor database)...objects=HorizontalManager()# For Django<1.10classMeta(object):horizontal_group='group1'# Group namehorizontal_key='user'# Field name to use group keyIn many cases useUUIDFieldfield forid.
TheAbstractHorizontalModelusesUUIDFieldas a them id field in default.Using a modelfromdjango.contrib.authimportget_user_modeluser_model=get_user_model()user=user_model.objects.get(pk=1)# Get by foreign instanceSomeLargeModel.objects.filter(uses=user)# Get by foreign idSomeLargeModel.objects.filter(uses_id=user.id)Model limitationsdjango.db.utils.IntegrityErroroccured when not specify horizontal key field to filterSomeLargeModel.objects.all()Cannot lookup by foreign key field, cause there are other (likedefault) databaselist(user.somelargemodel_set.all())History1.1.2 (2018-11-15)Update_create_object_from_paramsto new interfaceAdd support for Django 2.1Add support for Python 3.71.1.1 (2018-08-03)Migrate toQuerySetas a mixin1.1.0 (2018-03-30)Drop support for Django 1.9, 1.101.0.0 (2018-02-02)Add support for Django 2.0Drop support for Django 1.80.0.1 (2017-05-22)First release on PyPI.
Package: django-horizontal-list-filter
django-horizontal-list-filterMove list filter to  above of the changelist in django admin site.Installpipinstalldjango-horizontal-list-filterUsagepro/settings.pyINSTALLED_APPS=[...'django_simple_tags','django_middleware_global_request','django_horizontal_list_filter','mptt',# optional...]MIDDLEWARE=[...'django_middleware_global_request.middleware.GlobalRequestMiddleware',...]DJANGO_HORIZONTAL_LIST_FILTER_USE_SELECT2=TrueIf using mptt, make sure that django_horizontal_list_filter is above mptt, because django_horizontal_list_filter is override mptt's template.If using some other third part app provides customized list filter, you may need to rewrite the filter's template to turn the result html fromultoselect.PreviewReleasesv0.1.0First release.v0.1.1Fix cl context variable not provided problem.v0.1.2Remove django_static_jquery3 depends. Inject our css&js into ModelAdmin.media in apps.ready step.Add app_requires.Add License file.v0.2.0UseDJANGO_HORIZONTAL_LIST_FILTER_USE_SELECT2=Trueinpro/settings.pyto turn all simple-select-box to select2-style-select-box.v0.2.2Add field name as select box's class name.Fix the problem that the select boxes' width fixed to 150px problem.v0.2.4Fix filter label style if using tag h3.Add is_using_django_horizontal_list_filter flag into request.v0.2.6Fix filter block style that using ul tag.v0.2.7Add max-width css style to select box.v0.2.9Doc update.
Package: django-horizontal-sharding
Simple horizontal scaling utilities for django frameworkShort def:Scalability is the property of a system to handle a growing amount of work by adding resources to the systemScaling horizontally (out/in) means adding more nodes to (or removing nodes from) a system, such as adding a new computer to a distributed software application. An example might involve scaling out from one web server to three.With horizontal-scaling it is often easier to scale dynamically by adding more machines into the existing poolThis simple package allows the developer to add more than one table to one Model, each table limited by the maximum rows specified in settings.pyHow django-sharding workEvery Model has its own database and you can use 1 database for more than one modelEvery table has new id as premairy key (nid)nid is uuid but the first 8 charter are fixed and it used as prefixevery prefix is specific to database keyevery database can spilt by row count maxsharding django create a table for databases and register number of rows.Installationrun pip install django-horizontal-shardingto read configuration and use guide visit:https://github.com/Fethienv/django-sharding
Package: django-hosted-plugins
Django Hosted Plugins is used to host third-party plugins that work alongside
your project but cannot be hosted on first-party plugin repositories
due to restrictions imposed.This project was started to overcome restrictions imposed by WordPress.com
and is currently favoured towards hosting WordPress plugins.Requires Django and Django REST Framework. It is untested and comes AS-IS.Quick startAdd “rest_framework” and “hosted_plugins” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'rest_framework',
    'hosted_plugins',
]Include the plugins URLconf in your project urls.py like this:url(r'^plugins/', include('hosted_plugins.urls')),[OPTIONAL] Include login URLs for the browsable API. (See here for details:http://www.django-rest-framework.org/tutorial/quickstart/#urls):url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),Install pytz if you’re using a database that will require it for querying datetime fields:pip install pytzRunpython manage.py migrateto create the hosted_plugins models.Use the Django admin to add plugins, or use a script to automate it.
Package: djangohosting-recipe
DescriptionThis buildout recipe can be used setup a Django project
and to deploy it  using djangohosting.ch hosting services.Supported optionsThe recipe supports the following options.projectThis option sets the name for your project. The recipe will create a
basic structure if the project is not already there.versionThe version argument can accept a few different types of
arguments. You can specifytrunk. In this case it will do a
checkout of the Django trunk. Another option is to specify a release
number like0.96.2. This will download the release
tarball. Finally you can specify a full svn url (including the
revision number). An example of this would behttp://code.djangoproject.com/svn/django/branches/newforms-admin@7833.django-wc-pathPath the working copy of the Django project (trunk, tags and branches included)./usr/share/djangoby default. When using a checkout of django
(instead of release tarball), the recipe will first try to it copy from
djangohosting.ch working copy.settingsYou can set the name of the settings file which is to be used with
this option. This is useful if you want to have a different
production setup from your development setup. It defaults todevelopment.media-urlValue of MEDIA_URL Django settings. Defaults to/media/media-directoryValue of MEDIA_ROOT Django settings. Defaults to amediain the project
directory.admin-media-urlValue of ADMIN_MEDIA_PREFIX Django settings. Defaults to/admin_media/admin-media-directoryUsed to create an alias in a lighttpd configuration file. Defaults to
themediafolder in the admin’s Django folder.(init|lighttpd|private|public-html)-directoryPath (absolute or relative) to theinit,lighttpd,privateandpublic_htmldirectories. Defaultsinit,lighttpd,privateandpublic_html.lighttpd-binPath to lighttpd executable. Defaults to/usr/local/sbin/lighttpdhostHost of production server. Required.portPort of production server. Required.development-hostHost of development server. Defaults tolocalhost.development-portPort of development server. defaults to8000.download-cacheSet this to a folder somewhere on you system to speed up
installation. The recipe will use this folder as a cache for a
downloaded version of Django.extra-pathsAll paths specified here will be used to extend the default Python
path for thebin/*scripts.testIf you want a script in the bin folder to run all the tests for a
specific set of apps this is the option you would use. Set this to
the list of app labels which you want to be tested.testrunnerThis is the name of the testrunner which will be created. It
defaults totest.
Package: django-hosts
This Django app routes requests for specific hosts to different URL schemes
defined in modules called “hostconfs”.For example, if you ownexample.combut want to serve specific content
atapi.example.comandbeta.example.com, add the following to ahosts.pyfile:fromdjango_hostsimportpatterns,hosthost_patterns=patterns('path.to',host(r'api','api.urls',name='api'),host(r'beta','beta.urls',name='beta'),)This causes requests to{api,beta}.example.comto be routed to their
corresponding URLconf. You can use yoururls.pyas a template for these
hostconfs.Patterns are evaluated in order. If no pattern matches, the request is
processed in the usual way, ie. using the standardROOT_URLCONF.The patterns on the left-hand side are regular expressions. For example,
the followingROOT_HOSTCONFsetting will routefoo.example.comandbar.example.comto the same URLconf.fromdjango_hostsimportpatterns,hosthost_patterns=patterns('',host(r'(foo|bar)','path.to.urls',name='foo-or-bar'),)InstallationFirst, install the app with your favorite package manager, e.g.:pipinstalldjango-hostsAlternatively, use therepository on Github.You can find the full docs here:django-hosts.rtfd.orgThen configure your Django site to use the app:Add'django_hosts'to yourINSTALLED_APPSsetting.Add'django_hosts.middleware.HostsRequestMiddleware'to thebeginningof yourMIDDLEWAREsetting.Add'django_hosts.middleware.HostsResponseMiddleware'to theendof
yourMIDDLEWAREsetting.Create a new module containing your default host patterns,
e.g. in thehosts.pyfile next to yoururls.py.Set theROOT_HOSTCONFsetting to the dotted Python
import path of the module containing your host patterns, e.g.:ROOT_HOSTCONF='mysite.hosts'Set theDEFAULT_HOSTsetting to thenameof the host pattern you
want to refer to as the default pattern. It’ll be used if no other
pattern matches or you don’t give a name to thehost_urltemplate
tag.
Package: django-host-user-override
django-host-user-overrideOverrides current user based on host prefix. For example any request to5.user.example.com(format can be changed in settings) becomes
request as if you were logged in as user with ID 5. This allows you
to be logged in as different users in different tabsat the same timewithout losing your primary authenticated user.Works only if you're logged in as superuser by default (can be
changed in settings).Also gives you big red banner on top of every page if your user is
overridden.RequirementsYour DNS server should resolve subdomains*.user.<your domain>to the same IP address as main domain.Your project should not use absolute link generation or any other
technic that can change current subdomain. It is a more inconvenience
than requirement though.Installing django-host-user-overrideInstall the package from PyPI:pip install django-host-user-overrideAddhost_user_overridetoINSTALLED_APPS:INSTALLED_APPS=[...,'host_user_override',...,]AddHostUserOverrideMiddlewareright afterAuthenticationMiddleware:MIDDLEWARE=[...,'django.contrib.auth.middleware.AuthenticationMiddleware','host_user_override.middleware.HostUserOverrideMiddleware',...,]Update yoursettings.pyfile to support subdomains (don't forget about DNS as well):ALLOWED_HOSTS=['.example.com']SESSION_COOKIE_DOMAIN='.example.com'Set newchange_form.htmltemplate inUserAdmin:admin.site.unregister(User)@admin.register(User)classCustomUserAdmin(UserAdmin):change_form_template='host_user_override/change_form.html'Optional settingsUpdatesettings.pyif you want host pattern other than<id>.user.<domain>. Example foru<id>.<domain>:HOSTUSEROVERRIDE_HOST_REGEXP=r'u(\d+)\..+'HOSTUSEROVERRIDE_HOST_SUB_REGEXP=r'u\d+\.'HOSTUSEROVERRIDE_REDIRECT_URL_FORMAT='http://u{user_id}.{host}/'HOSTUSEROVERRIDE_PERMANENT_REDIRECT=FalseSetHOSTUSEROVERRIDE_PERMISSION_CHECKto customize required
permissions. Should be function that takes 2 positional arguments:
current user and desired user.SetHOSTUSEROVERRIDE_FORCE_ACTIVEto force overriden user to be active even when he is actually disabled.UsageOpen any non-superuser in Django Admin and press 'Login as multiuser' button.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.AcknowledgmentsProps to django-debug-toolbar team for HTML injection codeThanks to @dimoha for original idea
Package: django-hostutils
django-hostutilsDjango hostutils is a collection of utilities to provide information and metrics for hosts running a Django project. Data is available via included Bootstrap 5 templates and custom views/templates can also be used. Host metric data includes:Host OS, release, uptimeCPU count and utilizationMemory usageDisk partations and utilizationProcesses running, idle, sleepingNetwork interfaces and connectionsCode QualityWorkflowDescriptionStatusBanditsecurity checksBlackcode formattingCodeQLsecurity analysisCoverallscode coverage statusIsortpython import orderingMypystatic type checkingPytestunit testingRadoncode complexity analysisRuffstatic code analysisSafetydependency scannerCode Coverage:Dashboard:https://coveralls.io/github/djangoaddicts/django-hostutilsDocumentationFull documentation can be found on:https://django-hostutils.readthedocs.io/en/latest/index.htmlDocumentation source files are available in thedocsfolder.Installationinstall via pip:pip install django-hostutilsadd the following to your INSTALLED_APPS in settings.py:djangoaddicts.hostutilsadd the following to your project-level urls.py:path("hostutils/",include("djangoaddicts.hostutils.urls"),),UsageIncluded ViewsSeveral pages are available. If you have a Bootstrap 5 nav-menu you can add the following snippet in your navbar where appropriate:{%include'hostutils/bs5/snippets/hostutils_nav_menu.htm'%}Individual pages can also be linked directly:Host overview page:{%url'hostutils:host_details'%}CPU stats page:{%url'hostutils:host_cpu'%}Disk stats page:{%url'hostutils:host_disk'%}Memory stats page:{%url'hostutils:host_memory'%}Network stats page:{%url'hostutils:host_network'%}Process stats page:{%url'hostutils:host_process'%}Custom ViewsCustom views/templates can be used to override the Bootstrap 5 templates provided by default for GUI views. In your views, import the desired views(s) from hostutils and create a class that inherits the desired hostutils view.Here is an example of creating a custom view using ShowHost:fromdjangoaddicts.hostutils.viewsimportShowHostclassMyCustomShowHostView(ShowHost):template_name="my_custom_template.html"title="My Custom Title"Licensedjango-hostutils is licensed under the GNU-3 license (see the LICENSE file for details).https://github.com/djangoaddicts/django-hostutils/blob/docs/LICENSEContributingTo contribute to django-hostutils, please seeContributing
Package: django-houston
# Houston
Houston is drop-in-place analytics software for Django projects that stores 100% of usage data in-house. At no point is data sent to third parties.There are a number of projects in the Django ecosystem that facilitate integration with third party analytics software but most of these entail sending client usage to a third party, most likely Google. This is an acceptable strategy in some cases, Google Analytics is a great product that’s easy to integrate with. But if you’re developing software where your users might be hesitant to report their every page view to a third party, especially one with a history of illegally disclosing said data, you might want to consider keeping your users’ usage data on servers you control.## Usage
- Adddjango-houstonas a dependency in your requirements.txt file
- AddHoustonto your INSTALLED_APPS setting
- Include the Houston urls at some path in your urls.py file:url(r’^houston/’, include(‘Houston.urls’))- Include the tracking fragment on any pages where views should be tracked:{% include “Houston/tracking.html” %}It’s recommended to include the tracking fragment near the end of the document after any page critical scripts to minimize user impact of tracking, although you can include it anywhere.
Package: django-howl
django-howlWhat is django-howldjango-howlis a Django app where you can add custom observers and use them to check almost everything you want and pushes alerts to signals. You can connect to the signals and handle it in your way like sending notifications over different APIs.Requirementsdjango-howl supports Python 3 only and requires at least Django 2.2.
If you need support for Django versions have a look at django-howl < 1.0.0InstallationInstalldjango-howl(ordownload from PyPI):pipinstalldjango-howlAfter Installation add it toINSTALLED_APPSinsettings.py:INSTALLED_APPS=[# other apps'howl',]UsageNow you can login to the admin and configure some observers and build some nice apps
with it.Prepare for developmentA Python 3 interpreter is required. If you use pyenv with a virtualenv, follow the next steps$cd/path/to/project-root/$mkvirtualenvdjango-howl# activate virtualenv, if not activated yet
# and install all dev requirements:$pipinstall-e.[dev]Now you’re ready to run the tests:$py.testCode styleThis project is styled byblackandisort. You can use the following command to format the code automatically and make it black and isort compatible:$makeformat-python-codeResourcesDocumentationBug TrackerCode
Package: django-hstore
You needdynamic columnsin your tables. What do you do?Create lots of tables to handle it. Nice, now you’ll need more models and lots of additional sqls. Insertion and selection will be slow as hell.Use anoSQLdatabase just for this issue.Good luck.Create a serialized column. Nice, insertion will be fine, and reading data from a record too. But, what if you have a condition in your select that includes serialized data? Yeah, regular expressions.Documentation-Mailing ListProjects using this packagedjango-rest-framework-hstore:django-rest-frameworktools fordjango-hstoreNodeshot: extensible django web application for management of community-led georeferenced data - some features ofdjango-hstore, like theschema-modehave been developed for this project
Package: django-hstsmiddleware
Forces the use ofHTTPSusingHTTP Strict Transport Security(HSTS).Installation and UsageInstall the package, adddjango_hstsmiddlewaretosettings.INSTALLED_APPS, and adddjango_hstsmiddleware.middleware.HSTSMiddlewareto the top ofsettings.MIDDLEWARE_CLASSES.The following Django settings control its default behaviour:settings.HSTS_REDIRECT_TO:Specifies the URI to redirect a User Agent to, if it tries
to use a non-secure connection. Responds with HTTP Moved
Permanently.Defaults toNone, so no redirect occurs. Instead, responds
with HTTP Bad Request.settings.HSTS_MAX_AGE:The maximum number of seconds that a User Agent will remember
that this server must be contacted over HTTPS.Defaults to31536000, or approximately one year.settings.HSTS_INCLUDE_SUBDOMAINS:If true, tells a User Agent that all subdomains must also be
contacted over HTTPS, in addition to the current domain.Defaults toFalse