Saravanan666/pypi-org huggingface dataset:
Package: django-minisentry
minisentryA Django reusable app to extend sentry-sdk with ability to collect errors in
local database rather than send to sentry. An admin panel is provided to browse
grouped issues.This app is useful when for some reason you cannot use sentry.io interface,
maybe you can't send data to third party vendors, maybe you can't have a
self-hosted version.This is a very simple app, it hooks into sentry_sdk.init.before_send function,
serializes the events into json and stores them in the database.Thjs app is written in rush to get first working version out, I test the app in
my application and only maybe will add automatic tests if it gets used.I analysed the datastructures emitted by sentry-sdk and hae some confidence that
I didn't miss anything. The app will store the raw event as a whole, so if I
missed anything, corrections to the main template should be enough. It is a
recoverbale mistake.This app will obviously only work for errors that don't relate to database
connection itself. You have to have working django and connection to store them.Versioning: calver, I only care for the most recent version of sentry-sdk,
python and django, but likely it will work with some lower versions.I start with implementing only what I need, with time I will add more stuff.installpip install django-minisentry

# settings.py
INSTALLED_APPS = [
    ...,
    'minisentry'
]

# urls.py
urlpatterns = [
    ...
    path('minisentry/', include('minisentry.urls')),
    ...
]

# wherever you setup sentry_sdk
from minisentry import store
sentry_sdk.init(
    ...,
    before_send = store(
        send=False,            # default
        event_callback=print,  # maybe for debug
        hint_callback=print,   # maybe for debug
        ignore_errors=(ZeroDivisionError, KeyboardInterrupt)
    )
)developgit clone https://github.com/bartekbrak/django-minisentry
pip install -e django-minisentrylegalDear Sentry, please don't sue me. This project is for people who cannot use your
wonderful, best-in-class product. I'm your biggest fan and evangelise your paid
version where I can. This all is in good faith, but it does abuse your SDK, you
didn't build it so that we can store your events elsewhere. Thanks.todotestsbacklinks, in admin, in browsesearchgraph on issue listx minutes agopermissions?coloursstringify2 needs to escape htmlmanagement commands to delete oldstorage information, sizesclean cssprettify sqlbased onhttps://docs.djangoproject.com/en/4.2/intro/reusable-apps/https://docs.sentry.io/platforms/python/configuration/filtering/build and release (to myself)pip install -e .
pip install -U setuptools wheel build twine
# change "version = ????????" in setup.cfg
rm dist/* && python -m build --wheel &&  twine check dist/* && twine upload dist/*changelog2024-02-06 'dict' object has no attribute 'tags'2023-08-24 handle logger.error2023-08-17 display tags set viasentry_sdk.set_tag("sth", "sth")2023-08-11 ignore_errors, expand README2023-08-10 rename to minisentry2023-08-04 first rushed alpha version
Package: django-minke
LinksMinke on github:https://github.com/thomst/django-minkeMinke on Read the Docs:https://django-minke.readthedocs.ioGetting started:https://django-minke.readthedocs.io/en/latest/docs/gettingstarted.htmlA framework for remote-control- and configuration-management-systemsMinke is a framework that combines the full power of djangos admin-interface
with the reliability and configurability of fabric2. A pure open-source- and
pure python-solution to realize the most different szenarios concerning remote-
control and configuration-managment.Imagine you just need to setup some managment-commands for a handful of servers -
you can do that with minke. Imagine you have lots of servers with different
setups that you need to group and address seperatly - you can do that with
minke. Imagine you have servers with multiple subsystems installed on each of them
and you not just want to manage those systems but also to track configurations,
version-numbers, installed extensions or modules and to filter for all of those
values within your backend - you can do that with minke.Featuresfull integration with django’s admin-siteparrallel session-execution through celeryrealtime monitoring of executed remote-sessionscommand-line-api using django’s management-commandssession- and command-historyConceptThe main idea of minke is to define an arbitrary data-structure that represents
your server- and subsystem-landscape as django-models. And then be able to
run specific remote-tasks for those models right out of their changelist-sites.
Now those tasks could be anything about remote-control and system-managment, but
also fetching relevant data to update your django-data-structure itself.To make this possible there are three main elements:hosts,minke-models,and sessions.HostsA Host is a django-model that is basically the database-representation of a
specific ssh-config. It holds every information needed by fabric to connect
to the remote-system.Minke-ModelsMinke-models now are all those models that you want to run remote-sessions with.
This could be the data-representation of a server, but also of web-applications
running on this server, and even something like installed extensions, patches,
backups and everything else you want to track and manage in your minke-app.SessionsA session-class defines the code to be executed for minke-models. Sessions are
similar fabric-tasks. Within a session you have access to a connection-object
(as implemented by fabric) as well as to the minke-model-object you are working
with. So a session could be as simple as running a single shell-command on the
remote-machine, up to complex management-routines including manipulating the
data of the minke-model-object itself.
Package: django-mips
A simple API (build on top of the Django Model API) to store and manage MIP (molecular inversion probe) markers.
Detailed markers description e.g in [Science 338, 1619 (2012)].Prerequisites####  Python 2.7Linuxprobably, you already have it!Windowsdownload & install:https://www.python.org/ftp/python/2.7.10/python-2.7.10.msiremember to select “Add python.exe to Path”####   pip & virtualenv (optional)Linux (Ubuntu/Debian)sudo apt-get install python-pip python-dev build-essential
sudo pip install –upgrade pip
sudo pip install –upgrade virtualenvWindowsWith Python 2.7.10 version, pip is a part of the Python for Windows installer.Windows alternatively: pip can be downloaded with this script: [get-pip.py], and installed by running in console:C:> python get-pip.pyRequirements####   Django 1.7-1.8pip install django####   Python-PostgreSQL Database AdapterLinuxpip install psycopg2Windowspip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py27#egg=psycopg2Windows alternatively: download & install from win-psycopg project site -  e.g. [psycopg2]http://stickpeople.com/projects/python/win-psycopg/Download#### package
[![PyPI version](https://badge.fury.io/py/django-mips.svg)](http://badge.fury.io/py/django-mips)
[![Code Health](https://landscape.io/github/michal-stuglik/django-mips/master/landscape.svg?style=flat)](https://landscape.io/github/michal-stuglik/django-mips/master)
[![Build Status](https://travis-ci.org/michal-stuglik/django-mips.svg?branch=master)](https://travis-ci.org/michal-stuglik/django-mips)
[![Code Climate](https://codeclimate.com/github/michal-stuglik/django-mips/badges/gpa.svg)](https://codeclimate.com/github/michal-stuglik/django-mips)https://pypi.python.org/pypi/django-mips#### source code$ git clonehttps://github.com/michal-stuglik/django-mips.git#### with pip (recommended)Install with pippip install django-mipsyou will find mips folder in your Python directorySetup#### outside Django project, in python scripts:set database connection details in mips.dbsettings_default.pyset the DJANGO_SETTINGS_MODULE environment variable to “mips.settings”import os
os.environ.setdefault(“DJANGO_SETTINGS_MODULE”, “mips.settings”)set up Django: django.setup()import django
django.setup()Examples[scripts & README][get-pip.py]:https://raw.github.com/pypa/pip/master/contrib/get-pip.py[image]:https://pypip.in/v/django-mips/badge.png[1]:https://pypip.in/d/django-mips/badge.png[scripts & README]:https://github.com/michal-stuglik/django-mips/tree/master/mips/example[psycopg2]:http://stickpeople.com/projects/python/win-psycopg/2.6.0/psycopg2-2.6.0.win32-py2.7-pg9.4.1-release.exe[pythonwin]:https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi[django-mips]:https://pypi.python.org/pypi/django-mips[Science 338, 1619 (2012)]:http://www.sciencemag.org/content/338/6114/1619
Package: django-mirage-field
django-mirage-fieldIntroduceA Django model fields collection that encrypt your data when save to and decrypt when get from database. It keeps data always encrypted in database. Base on AES, it supports query method likeget()andfilter()in Django.Mirage can also migrate data from origin column to encrypted column in database with a good performance.FeaturesUse settings.SECRET_KEY as secret key default or anyelse which length >= 32Support CharField, TextField, IntegerField, EmailFieldSupport Django ORM'sget(),filter()query methodSupport AES-256-ECB and AES-256-CBC(v1.2.0)Support PostgreSQL and MySQL databaseSupport Django model fielddb_indexanduniqueattributesInstallationpipinstalldjango-mirage-fieldUsagefrommirageimportfieldsclassTestModel(models.Model):age=fields.EncryptedIntegerField()obj=TestModel.objects.get(age=18)obj.id# 1obj.age# 18type(obj.age)# intdatabase=#select*fromtestmodelwhereid=1;id          |           age---------------------+--------------------------1 | -bYijegsEDrmS1s7ilnspA==frommirage.cryptoimportCryptoc=Crypto()# key is optional, default will use settings.SECRET_KEYc.encrypt('some_address')# -bYijegsEDrmS1s7ilnspA==c.decrypt('-bYijegsEDrmS1s7ilnspA==')# some_addressSettingsMIRAGE_SECRET_KEYMIRAGE_CIPHER_MODE (v1.2.0+)MIRAGE_CIPHER_IV (v1.2.0+)MIRAGE_SECRET_KEYYou can use thesettings.SECRET_KEYas default key, if you want custom another key for mirage, set theMIRAGE_SECRET_KEYin settings.Mirage will get thesettings.MIRAGE_SECRET_KEYfirst, if not set, mirage will get thesettings.SECRET_KEY.MIRAGE_CIPHER_MODEMIRAGE_CIPHER_MODEis optional, choices are below, If don't set, default isECB.ECBCBCMIRAGE_CIPHER_IVMIRAGE_CIPHER_IVis optional, if you don't set, it will use a default: "1234567890abcdef", it's length must be 16.Model FieldsEncryptedTextFieldEncryptedCharFieldEncryptedEmailFieldEncryptedIntegerFieldEncryptedURLField(v1.3.0+)Data MigrateAddmiragetoINSTALLED_APPSWay 1. Migrationsaddapp_name,model_name,field_nameinmigrations.RunPythonfrom mirage.tools import Migrator

migrations.RunPython(Migrator("app_name", "model_name", "field_name").encrypt, reverse_code=Migrator("app_name", 'model_name', 'field_name').decrypt),Way 2. CommandsOptions:--app--model--field--method (optional:encrypt,decrypt,encrypt_to,decrypt_to,copy_to)--tofield (need when useencryt_to,decrypt_to,copy_tomethod)Optional options:--offset ("select * from xxx where id > offset")--total ("select * from xxx order by id limit total")--limit: set the query count in every update, default is 1000, if you set -1, mirage will query all rows one time to update.Examples./manage.py mirage --app=yourapp --model=testmodel --field=address --method=encrypt --offset=2000000 --total=3000000

./manage.py mirage --app=yourapp --model=testmodel --field=address --method=encrypt_to --tofield=encrypted_addressExceptionsfrom mirage import exceptionsEncryptedFieldExceptionPerformanceWith ECB modeMigrate data: 6000,000 columns takes 40 minutes, Average 1 column/2.5msOnly encrypt/decrypt: Average 1 value/msClientsJava
Package: django-mirror
This package marriesDjangowithCodeMirror. It provides (1) a customisable form widget, and (2) a shorthand way to use this widget in the admin. In both cases the relevant static files (including mode/theme/addon files) are automatically included as form assets.installationThis is a Python 3 package with no other dependencies apart from Django and it is offered at theCheese Shop:# usually inside a virtual environmentpipinstalldjango-mirrorThe CodeMirror files (version5.63.3) are included in the package. The supported Django versions are2.2,3.0,3.1, and3.2.settings# add 'django_mirror' to your INSTALLED_APPS if you want the package to be# handled by Django's collectstatic commandINSTALLED_APPS+=['django_mirror']# use DJANGO_MIRROR_DEFAULTS to specify default options for your widgets# see the next section for more info about the optionsDJANGO_MIRROR_DEFAULTS={'mode':'rst','addons':['mode/overlay'],'line_wrapping':True,}widgetBascially this package provides a form widget calledMirrorAreathat extends Django’sTextareawidget.fromdjangoimportformsfromdjango_mirror.widgetsimportMirrorAreaclassCommentForm(forms.Form):text=forms.CharField(widget=MirrorArea(attrs={'rows':20},# the parent class' attrs still worksmode='markdown',# the other kwargs are forwarded to CodeMirror))TheMirrorAreawidget can be initialised with the following arguments:Any of CodeMirror’sconfig options. These can be specified in either camelCase or snake_case (e.g. bothtabSizeandtab_sizewould work). The css/js files associated with themode, if provided, are included as form assets.addons, a list of CodeMirroraddons, e.g.dialog/dialog. The css/js files associated with the addons are recursively included as form assets.attrs, just as Django’s form widgets.The addons and config options are merged with and overrideDJANGO_MIRROR_DEFAULTSif the setting has been defined.adminIf you want to use the widget in the admin panel, you can subclass theMirrorAdminmixin, which provides themirror_fieldsmodel admin option:fromdjango.contribimportadminfromdjango_mirror.adminimportMirrorAdminfromweblog.modelsimportComment@admin.register(Comment)classCommentAdmin(MirrorAdmin,admin.ModelAdmin):mirror_fields=('comment',)# default optionsmirror_fields=(# with custom options('comment',{'mode':'markdown','line_wrapping':True,}),)The mixin also includes a bit of css to make CodeMirror look more like regular admin textarea fields.similar projectsThere are several other packages that provide customisable CodeMirror widgets:django-codemirrordjango-codemirror2django-codemirror-widgetdjango-codemirror-widget-2licenceGNU LGPLv3. Please refer toCOPYINGfor the base GPLv3 licence and toCOPYING.LESSERfor the additional permissions on top that constitute LGPLv3.
Package: django-misa
ISA organisation for metabolomic studies with DjangoFurther documentation available onReadTheDocsQuick startAdd “misa” and django application dependencies to your INSTALLED_APPS setting like this (misa should come before gfiles and mbrowse):INSTALLED_APPS = [
    ...
    'misa',
    'mbrowse',
    'gfiles',

    'django_tables2',
    'django_tables2_column_shifter',
    'django_filters',
    'bootstrap3',
    'django_sb_admin',
    'dal',
    'dal_select2',
]Include the polls URLconf in your project urls.py like this:url(r'^', include('gfiles.urls')),
url('mbrowse/', include('mbrowse.urls')),
url('misa/', include('misa.urls')),Runpython manage.py migrateto create the misa models.Start the development server and visithttp://127.0.0.1:8000/misa/ilist/Registerhttp://127.0.0.1:8000/register/and loginhttp://127.0.0.1:8000/login/Create an investigationhttp://127.0.0.1:8000/icreate/, studyhttp://127.0.0.1:8000/icreate/, assayhttp://127.0.0.1:8000/icreate/acreateUpload data to an assayhttp://127.0.0.1:8000/upload_assay_data_files/[assay-id]/Add a protocol e.g. Chromatography protocolhttp://127.0.0.1:8000/cp_createAdd ontology informationhttp://127.0.0.1:8000/search_ontologyterm
Package: django-misaka
Django-MisakaNow this app provide template filter and tag, Misaka API is not yet available.InstallationInstall from PyPI:pip install django-misakaAdddjango_misakato yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'django_misaka',
)UsageIn your templateTemplate filter:{% load markdown %}
...
{{ text|markdown|safe }}Template tag:{% load markdown %}
...
{% markdown %}
    ...
{% endmarkdown %}Change logv0.2.1Update code to work with Misaka 2.1Add support for Django 1.8 to 1.10Drop support for Django 1.6 and 1.7v0.2.0Add template tag.Functionmarkdownwas renamedmarkdown_filter.Update information for author (setup.py).v0.1.0First version, it’s only provides template filter.
Package: django-misery
# django-misery## OverviewA simple ban system for Django, that does nasty stuff to trolls wandering on your website.Users banned the classical way are encouraged to bypass the ban by creating another account or changing their IP address.A nastier and probably more effective way to do it is to use what is known as slowban, and errorban. This Django middleware implements those.### Features* slowing page generation for miserable users* logging them out randomly* send a 404 from time to time...* ... or a 403...* ... or even a blank page if you want* last but not least, a wonderful ASP.NET error page made just for themHey, they deserved it!### Pros:* lightweight, designed not to slow down your website a single bit (from a non-miserable point of view, of course)* supports both IPv4 and IPv6### Cons:* doesn't currently support masks. Yes, it can be handy against users having a botnet under their control or in case of a user having an IPv6 range, but the current implementation favors speed over features.## Installation & configurationTo install the app, you can use PIP: `pip install django-misery`; then add `django_misery` to your INSTALLED_APPS setting, and `django_misery.middleware.miserize` to your MIDDLEWARE_CLASSES.The following settings can be personnalized:* `MISERY_SLOW_STRENGTH`: seconds that miserable users will have to wait _at least_ (maximum twice longer) (default: 6)* `MISERY_LOGOUT_PROBABILITY`: **percentage** of probability a user will be disconnected (default: 10)* `MISERY_403_PROBABILITY`: same for 403 (default: 10)* `MISERY_404_PROBABILITY`: I'm gonna let you guess for this one (default: 10)* `MISERY_WHITE_SCREEN_PROBABILITY`: same for a nice, 100% pure white (not a single subpixel in the viewport will be off, I promise) (default: 10)* `MISERY_ASP_ERROR_PROBABILITY`: a free bonus for ASP lovers (and I'm sure there are plenty around here), the template renders just great. Oh and: to make it even more beautiful, it's in French (default: 10). Quick preview:![ASP error overview](http://img11.hostingpics.net/pics/560987ASPerror.png)By default, miserable users have approximately a 50-50 chance to see the real page. They won't stay long, I promise.## MiscellaneousInspired by the [Drupal Misery module](http://drupal.org/project/misery), see also ["Suspension, Ban or Hellban?"](http://www.codinghorror.com/blog/2011/06/suspension-ban-or-hellban.html) for hellbanning.
Package: django-misfit
[![Build Status](https://travis-ci.org/orcasgit/django-misfit.svg?branch=master)](https://travis-ci.org/orcasgit/django-misfit) [![Coverage Status](https://coveralls.io/repos/orcasgit/django-misfit/badge.png)](https://coveralls.io/r/orcasgit/django-misfit) [![Requirements Status](https://requires.io/github/orcasgit/django-misfit/requirements.png?branch=master)](https://requires.io/github/orcasgit/django-misfit/requirements/?branch=master)Django-misfit is a Django app for integrating a user’s Misfit data into your
site.It handles the details of getting your app authorized to access your user’s
Misfit data via the [Misfit API](https://build.misfit.com/docs/).
Package: django-missing
This Django application bundles some common and useful features which have not
(yet) found a way into Django itself.You are invited to contribute your own features so that together we create a
powerfull and good library of Django additions. Because sometimes you cannot
imagine an useful feature before somebody shows it to you. So it is useful to
have all of them collected together.Documentation is found at:http://django-missing.readthedocs.org/
Package: django-mississippi
Mississippi goes one step beyond Django’s URL dispatcher to:Promote resources (pages) and resource types to first class citizensAllow for /<slug> URLs without any prefix, regardless of the resource typeEasily and automatically generate sitemapsRight now Mississippi is in its early development stage; there is more to come.Quick StartAdd ‘mississippi’ to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'mississippi',
]Make the mississippi URLconf the last one in your project urls.py like this:url(r'', include('mississippi.urls')),Runpython manage.py migrateto create the mississippi models.TODO: Describe how to associate models with mississippi models.TODO: Describe how to test to ensure mississippi is installed correctly.
Package: django-mithril
# Mithril````,--.  ,--.  ,--.            ,--.,--.,--,--,--.`--',-'  '-.|  ,---. ,--.--.`--'|  ||        |,--.'-.  .-'|  .-.  ||  .--',--.|  ||  |  |  ||  |  |  |  |  | |  ||  |   |  ||  |`--`--`--'`--'  `--'  `--' `--'`--'   `--'`--'````A Django application providing decorators, middleware, and authenticationbackends for IP whitelisting.> ### WARNING>> We grab IP address information from `request.META` -- which is potentially> spoofable. Make sure your gateway servers don't allow rewriting of the headers> you're targeting.## Getting StartedMithril works by providing two new models -- `Whitelist` and `Range` -- that youmake a foreign key to from your objects. You define a `mithril.strategy.Strategy`subclass to describe to mithril how you would like to obtain a `Whitelist` froma request.````python# myapp/models.pyfrom django.db import modelsfrom django.contrib.sites.models import Sitefrom mithril.models import Whitelistclass SiteACL(models.Model):site = models.OneToOneField(Site)whitelist = models.ForeignKey(Whitelist, related_name='site_acl')# myapp/strategy.pyfrom mithril.strategy import Strategyfrom django.conf import settingsfrom myapp.models import SiteACLclass MyStrategy(Strategy):# a tuple of `method name` -> `lookup to apply`.# if the method does not exist, or returns None, it# continues to the next tuple.actions = (('view_on_site', 'site_acl__pk'))def view_on_site(self, request, view, *view_args, **view_kwargs):try:site_acl = SiteACL.objects.get(site__pk=settings.SITE_ID)return site_acl.pkexcept SiteACL.DoesNotExist:pass# settings.pyMITHRIL_STRATEGY = 'myapp.strategy.MyStrategy'MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + ['mithril.middleware.WhitelistMiddleware']INSTALLED_APPS = list(INSTALLED_APPS) + ['mithril']````
Package: djangomix
Django MixDjango integration forLaravel MixLaravel Mix helper in python representation to easy usage with laravel-mix npm package in Django projects.InstallationDjango:pip install djangomixNote:Do not forget to include the package in requirementsLaravel Mix NPM package:Follow instructions on Laravel Mix webpagePlease, see example of webpack.mix.js configration below.UsageAdd'djangomix'to INSTALLED APPS in Django configINSTALLED_APPS = [
    ...
    'djangomix',
]Include in base.html (or any other template){% load mix %}Use mix template tag in your templates to load scripts, styles,...Note: Second parameter is path to manifest.json<script src="{% mix 'build/app.js' 'polls/static' %}"></script>The paths are related to webpack.mix.js configuration.You can set path for manifest dir and public path also in Django settingsMANIFEST_DIRECTORY = getattr(settings, 'LARAVELMIX_MANIFEST_DIRECTORY','')
PUBLIC_URL = getattr(settings, 'LARAVELMIX_PUBLIC_URL', settings.STATIC_URL)Example configration of webpack.mix.js:let mix = require('laravel-mix');

let staticPath = 'polls/static/build'
let resourcesPath = 'polls/resources'

mix.setResourceRoot('/static/build') // setResroucesRoots add prefix to url() in scss on example: from /images/close.svg to /static/images/close.svg

mix.setPublicPath('polls/static') // Path where mix-manifest.json is created

// if you don't need browser-sync feature you can remove this lines
if (process.argv.includes('--browser-sync')) {
  mix.browserSync('localhost:8000')
}

// Now you can use full mix api
mix.js(`${resourcesPath}/js/app.js`, `${staticPath}/`)
mix.sass(`${resourcesPath}/sass/app.scss`, `${staticPath}/`)Do you have problem with setup?Read how to setup and start with Vue in DjangoMaintained by:Marek RacíkfromIdeaLoop