Saravanan666/pypi-org huggingface dataset:
Package: django-mymigrate
=====django-mymigrate=====django-mymigrate is a wrapper on south that allows to quickly migrate all project apps with one command.- version 0.2- https://github.com/hellpain/django-mymigrateInstallation-----------pip install southpip install django-mymigrateIn your settings.py define PROJECT_ROOT as a folder containing all your apps.from os.path import join, normpath, dirnamePROJECT_ROOT = join(normpath(dirname(__file__)), '..')in django 1.6 better use BASE_DIR which django createsCommands------------ ./manage.py mymigrate -iCreates initial migrations for all apps in project directory.It is equivalent to run "./manage.py schemamigration app_name --initial" through all apps in project directory.- ./manage.py mymigrate -aCreate auto migrations for all apps in project directory.It is equivalent to run "./manage.py schemamigration app_name --auto" through all apps in project directory.- ./manage.py mymigrate -dDeletes all migrations on disk and database.Typical use-----------1) ./manage.py syncdb --allCreate all tables2) ./manage.py mymigrate -iCreates initial migrations for all apps in project directory.3) ./manage.py migrate --fakeApply fake migrations.4) Change something in models...5) ./manage.py mymigrate -aCreate auto migrations for all apps in project directory.6) ./manage.py migrateApply migrations.7) ./manage.py mymigrate -d(optional) Delete all migrations on disk and database.Notes:-----------When you created initial migrations using "./manage.py mymigrate -i" and then created new app, you should manually run"./manage.py schemamigration new_app_name --initial" & "./manage.py migrate new_app_name" to create and apply initial migrations.Only after that you can use "./manage.py mymigrate -a" in future development.Release Notes:------------ 0.2  Better support for django 1.6
Package: django-mynewsdesk
Django package forMyNewsDesk APIInstallationUse your favorite Python installer to install it from PyPI:pip install django-mynewsdeskQuick startAdd “mynewsdesk” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'mynewsdesk',
)Add MYNEWSDESK_KEY to settings like this:MYNEWSDESK_KEY = 'your unique key'For South support, customize the SOUTH_MIGRATION_MODULES setting like so:SOUTH_MIGRATION_MODULES = {
    'mynewsdesk': 'mynewsdesk.south_migrations',
}Runpython manage.py migrateto create the polls models.APImynewsdesk.api.request(service, params) - request to MyNewsDesk APIservice: MyNewsDesk API service name
params: params for requestreturn: request response (request library)mynewsdesk.api.get_list(type_of_media) - request material listtype_of_media: mynewsdesk.models.TYPE_PRESSRELEASE, mynewsdesk.models.TYPE_NEWS, etc…returns: JSON from api requestmynewsdesk.api.subscribe(email, types_list) - subscribe emailemail: e-mail of subscriber
types_list: list of material types for subscriptionmynewsdesk.sync.sync_list(type_of_media) - synchronize materials to local databasetype_of_media: mynewsdesk.models.TYPE_PRESSRELEASE, mynewsdesk.models.TYPE_NEWS, etc…returns: dictionary like this {updated: n, create: n, errors: n}mynewsdesk.sync.sync_all() - synchronize materials of all types to local databasereturns: dictionary like this {updated: n, create: n, errors: n}Contribute & SupportIf you have an issue requests, or you find a bug, you can easily report them on GitHub Issues.
If you want to fix bug or create new feature, just fork, make changes and create a pull request. List of TODOs you can find below here.
Furthermore, you can create better documentation.TODOmethod for ‘view’ API servicemethod for ‘search’ API servicemethod for ‘pressroom_info’ API servicemethod for ‘create_comment’ API serviceuncomment models and parse ‘subjects’uncomment models and parse ‘geographic_areas’uncomment models and parse ‘contact_peoples’uncomment models and parse ‘comments’parse ‘related_items’parse ‘instant_messaging’CreditsCreated and maintained byPavel Kozlov
Package: django-mysql
The dolphin-pony - proof that cute + cute = double cute.Django-MySQL extends Django’s built-in MySQL and MariaDB support their specific
features not available on other databases.What kind of features?Includes:QuerySetextensions:‘Smart’ iteration - chunked pagination across a large querysetapprox_countfor quick estimates ofcount()Query hintsQuickpt-visual-explainof the underlying queryModel fields:MariaDB Dynamic Columns for storing dictionariesComma-separated fields for storing lists and sets‘Missing’ fields: differently sizedBinaryField/TextFieldclasses,BooleanFields represented by BIT(1)ORM expressions for over 20 MySQL-specific functionsA new cache backend that makes use of MySQL’s upsert statement and does
compressionStatus variable inspection and utility methodsNamed locks for easy locking of e.g. external resourcesTable lock manager for hard to pull off data migrationsTo see them all, check out the exposition athttps://django-mysql.readthedocs.io/en/latest/exposition.html.Requirements and InstallationPlease seehttps://django-mysql.readthedocs.io/en/latest/installation.html.DocumentationEvery detail documented onRead The Docs.
Package: django-mysql-aesfield
Provides an AES field for Django that works with MySQL to do the AES encryption
and decryption in the database.See:https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_aes-decryptCredit:Kumar McMillan did a lot of this work.UsageLike any other field:from aesfield.field import AESField

class SomeModel(...):
    key = AESField()ConfigurationAESField takes the following parameters beyond a normal CharField:aes_prefix: the prefix to use on fields, defaults toaes:aes_key: the key to use in the lookup method to find a suitable key for
this field, defaults todefaultSettings:AES_METHOD: the module to look in for a key lookup method, if you want
something different from the default,aesfield.defaultAES_KEYS: used by theaesfield.defaultmethod. It’s a dictionary of keys
to filenames. Those files must be able to be read by the Django process. It
must have adefaultkey, unless you specify a specifc one inaes_keyCommandsIf you addaesfieldtoINSTALLED_APPSyou’ll get one more command,generate_aes_keys. This will generate a new file for each file mentioned in
theAES_KEYSdictionary.But only if that file does not already exist.
Package: django_mysql_fields
A small collection of fields which we find useful for using MySQL as our Django database provider.RequirementsPython 3.4, 3.5Django 1.9.xMySQL Community Server 5.6.xMySQL Connector Python (Multiplay Fork) -https://github.com/multiplay/mysql-connector-pythonQuickstartInstall from pypi:pip3 install django-mysql-fieldsFieldsJSONField - Based on the Django contrib Postgres Field(excluding lookups).UUIDField - For storing full UUID’s in MySQL.Running TestsDownload and install Virtualbox and Vagrant.Run Vagrant up installation:vagrant upYou can then ssh into your newly created Vagrant install:vagrant sshActivate virtualenv from within Vagrant:. venv/bin/activateEnter project folder from within Vagrant:cd django_mysql_fieldsRun tests:./test.sh
Package: django-mysql-fix
django-mysql-fixThis project contains optimizations (hacks) for MySQL for Django ORM.It’s based on Django 1.7 (master branch). It was started on PyCon 2014 Development Sprint.We are going to test possible regressions that might appear in real projects.
This backend will pass all Django tests, but we still have to test it in real projects.How does it affect me?There are two very simple ways to cacth INNER JOIN bug:Once you specify field from foreign table inlist_displayin your Django Admin model;Once you try to sort (order) by field from foreign table.In these cases even if you limit query by 1 it will join whole tables, order them and only after that it will slice it to limit. Thus if you have i.e. 400k records in two tables it would take 3+ seconds to get small slice. STRAIGHT_JOIN forces MySQL work as we expect: order -> slice -> join.How to useSpecify django-mysql-fix backend in your DATABASES setting in Django settings.py:DATABASES = {
    'default': {
        'ENGINE': 'django_mysql_fix.backends.mysql',
        ...
    },
}CompatibilityTested with Django master branch and Django 1.6.0+.It doesn’t work with Django <= 1.5.x.Fixed issuesFor now there is only one optimization there.MySQL INNER JOIN with order fails to optimize query that ends up with seconds
to get result, but STRAIGHT_JOIN instead of INNER JOIN solves the issue and
we can get result in 0.001 instead of 3+ seconds.https://code.djangoproject.com/ticket/22438
Package: django-mysql-fuzzycount
When using MySQL,counting all rowsis very expensive on large InnoDB tables. This is a replacement forQuerySetthat returns an approximation ifCOUNT(*)is called with no additional constraints. In all other cases it should behave exactly as QuerySet.This only works with MySQL and behaves normally for all other engines.InstallationInstall the packagedjango-mysql-fuzzycountfrom PyPI usingpip:$ pip install -U django-mysql-fuzzycountUsageThere are a couple ways to use theFuzzyCountQuerySet.You can import and use the providedFuzzyCountManageron your Django models:from django.db import models

from mysql_fuzzycount.managers import FuzzyCountManager

class Choice(model.Model):
    objects = FuzzyCountManager()

    # ...Then, doing a count on theChoicemodel, without any constraints, will approximate the total count:>>> Choice.objects.count()  # approximation
100
>>> Choice.objects.filter(votes__gt=10).count()  # not an approximation
28Another common issue is counts in the admin for a model. There is a baseModelAdminclass that you can subclass in youradmin.pyfiles to prevent expensiveCOUNT(*)queries upon loading the admin page. In anadmin.pyfor one of your models:from django.contrib import admin

from mysql_fuzzycount.admin import FuzzyCountModelAdmin

from myapp.models import Choice


class ChoiceAdmin(FuzzyCountModelAdmin):
    pass

admin.site.register(Choice, ChoiceAdmin)Now, when you load the admin page for theChoicemodel, the count for pagination will be approximate.TestingIt has been tested in production, but there are no unit or integration tests.LicenseCopyright © 2013, Educreations, Inc under the MIT LICENSE.
Package: django-mysql-geventpool
django-mysql-geventpoolMysql Connection Pooling backend for Django 2.0+ using gevent, only supports Python 3.4 or newer.
It works with gunicorn async worker via gevent.This implimentation is based on django-db-geventpool(https://github.com/jneight/django-db-geventpool).installpip install django-mysql-geventpoolSettingsAdd the 'django_mysql_geventpool' modules to the INSTALLED_APPS like this:INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_mysql_geventpool',
    # ...other installed applications...
)Add MAX_CONNS to OPTIONS to set the maximun number of connections allowed to database (default=4)DATABASES = {
    'default': {
        'ENGINE': 'django_mysql_geventpool.backends.mysql',
        'NAME': 'dbname',
        'USER': 'dbuser',
        'PASSWORD': 'dbpassword',
        'HOST': 'dbhost',
        'PORT': 'dbport',
        'OPTIONS': {
            'MAX_CONNS': 20,
            'MAX_LIFETIME': 5 * 60  # connection lifetime in seconds, and if set 0, unlimited persistent connections if usable. default is 0.
        }
    }
}
Package: django-mysql-geventpool-27
django-mysql-geventpool-27.. image::https://circleci.com/gh/laurentL/django-mysql-geventpool/tree/master.svg?style=svg:target:https://circleci.com/gh/laurentL/django-mysql-geventpool/tree/masterMysql Connection Pooling backend for Django > 2.0 using gevent, only supports Python 3.7+
It works with gunicorn async worker via gevent.
It implement anloadbalancing simple algo.Fork from :https://github.com/shunsukeaihara/django-mysql-geventpoolThis implimentation is based on django-db-geventpool(https://github.com/jneight/django-db-geventpool).Installation.. code-block:: consolepip install django-mysql-geventpool-27SettingsAdd the 'django_mysql_geventpool_27' modules to the INSTALLED_APPS like this:.. code-block:: pythonINSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_mysql_geventpool-27',
    # ...other installed applications...Add MAX_CONNS to OPTIONS to set the maximun number of connections allowed to database (default=4).. code-block:: pythonDATABASES = {
    'default': {
        'ENGINE': 'django_mysql_geventpool_27.backends.mysql',
        'NAME': 'dbname',
        'USER': 'dbuser',
        'PASSWORD': 'dbpassword',
        'HOST': 'dbhost',
        'PORT': 'dbport',
        'OPTIONS': {
            'MAX_CONNS': 20
        }
    }
}Load balancing Galera multi masterFor each connection, a random choice is operated on the HOST key of the DATABASE setting.
For easy provisioning by an orchetrator like puppet/salt/ansible.., you can use this type of setting:.. note::All server must listen on the same tcp port... code-block:: pythonDATABASES = {
    'default': {
        'ENGINE': 'django_mysql_geventpool_27.backends.mysql',
        'NAME': 'dbname',
        'USER': 'dbuser',
        'PASSWORD': 'dbpassword',
        'HOST': 'server1,server2,serve3',
        'PORT': 'dbport',
        'OPTIONS': {
            'MAX_CONNS': 20
        }
    }
}
Package: django-mysqlping
Ping to MySQL in Django middleware.This middleware ping to MySQL server before the request and auto reconnect to the server.It supports PyMySQL(using MySQLdb mode) and mysqlclient in the database backend of Django(django.db.backends.mysql).UsageAdd to settings.INSTALLED_APPSINSTALLED_APPS = [
    ...
    'mysqlping',
]Add to settings.MIDDLEWARE (For example, you want to ping before every processes, therefore insert the middleware to first.)MIDDLEWARE = [
    'mysqlping.middleware.MySQLPingMiddleware',
    ...
]LicenseThis software is licensed under the MIT License.AuthorShinya Okano
Package: django-mysql-pool
AlterENGINEtomysql_pool.
Add someDATABASE_POOL_ARGSfor example:DATABASE_POOL_ARGS = {
    'max_overflow': 10,
    'pool_size':5,
    'recycle':300
}Optionally add asa_pool_keyvalue so we don’t need to hash each db.Example:'two': {
    'ENGINE': 'mysql_pool',
    'sa_pool_key': 'two',
    ...
}Also optionally, you can add a ‘backend’ key with the importable path to
the backend you want to use.'backend': 'mysql_pymysql.base'Currently, we only support mysql_pymysql and the default django mysql backend.Require SQL Alchemy 0.7 for the events.TODO:some proper testsmake test utils work with multiple databases, by doing features.confirm on
each database connnection, as opposed to just the first.
Package: django-mysql-pymysql
django-mysql-pymysql====================This is a Django database backend for MySQL, using the PyMySQL database adapter. It is intended to be a drop-in replacement for the built-in MySQLdb backend, and leverages quite a bit of its code.It is currently experimental, and has only been tested against Django trunk (1.4-pre-alpha), and Vinay Sajip's Py3k branch on BitBucket (https://bitbucket.org/vinay.sajip/django). At the moment, it won't work with Django 1.3, as it uses Aymeric Augustin's timezone-aware datetime patch.Requirements------------* Django trunk or Py3k Branch* PyMySQL (patches here: https://github.com/clelland/PyMySQL)Installation------------::1. Clone and install into your site-packages directory:$ git clone https://github.com/clelland/django-mysql-pymysql$ cd django-mysql-pymysql$ python setup.py install2. Edit your settings file:::DATABASES = {'default': {'ENGINE': 'mysql_pymysql','HOST': ...,'USER': ...,'PASSWORD': ...,}}3. You're done.
Package: django-mysql-ssl
# Django MySQL SSL**Description**:  Backport support for manage.py dbshell when mysql SSL is enabled## DependenciesThis application is confirmed to work with Django 1.5. It should also work with Django 1.6-1.7.  This plugin is not necessary for Django 1.8, as the capability is built into the core.## Installation1. Install the application and its dependencies```pip install django-mysql-ssl```## Usage1. Make sure you have configured your mysql database in the django settings with the appropriate ssl ca.  You may also need 'cert' and 'key', but for most purposes 'ca' should work fine.  This functionality is built into django and has nothing to do with this plugin.```pythonDATABASES = {'default': {'ENGINE': 'django.db.backends.mysql',...'OPTIONS':  {'ssl': {'ca': '<PATH TO CA CERT>'}}}}```1. Connect to the db shell using the `dbshell_ssl` command:```shell./manage.py dbshell_ssl```## Known issuesNone## Getting helpIf you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.## Getting involvedPlease feel free to fork this repo and submit Pull Requests with any enhancements.----## Open source licensing info1. [TERMS](TERMS.md)2. [LICENSE](LICENSE)3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)----## Credits and references1. Django ticket explaining the broken dbshell command: https://code.djangoproject.com/ticket/226461. Django PR implementing the functionality in Django 1.8: https://github.com/django/django/commit/01801edd3760f97a4ebc4d43ca5bbdbbdfebbb0a
Package: django-nacl-fields
Django NaCl Encrypted FieldsThis is a collection of Django Model Field classes that are encrypted using PyNaCl. This package is largely based ondjango-encrypted-fields, which makes use of the outdated Keyczar library to encrypt fields. Besides that, it is inspired bydjango-fernet-field.About PyNaClPyNaClis a Python binding tolibsodium, which is a fork of theNetworking and Cryptography library. These libraries have a stated goal of improving usability, security and speed.Getting StartedInstalldjango-nacl-fields:pipinstalldjango-nacl-fieldsAddnacl_encrypted_fieldsto yourINSTALLED_APPS:INSTALLED_APPS=[...'nacl_encrypted_fields'...]Create a key to be used for encryption:$pythonmanage.pycreatekey# put the following line in your settings.py:NACL_FIELDS_KEY=b'p1Et2Rb@;^BYdo`ZRFi!Hc-MXu(^|bVqA-FGqffM'In yoursettings.py:NACL_FIELDS_KEY=b'p1Et2Rb@;^BYdo`ZRFi!Hc-MXu(^|bVqA-FGqffM'Then, in yourmodels.py:fromdjango.dbimportmodelsfromnacl_encrypted_fields.fieldsimportNaClTextFieldclassMyModel(models.Model):text_field=NaClTextField()Use the model as you would normally and the data will be stored encrypted in the database.Note:Encrypted data cannot be used to query or sort. In SQL, these will all look like text fields with random text.It is also possible to append the fields key to your settings file automatically upon creation, by using the-fflag:pythonmanage.pycreatekey-fsettings.pyWheresettings.pyis the path to your settings file.Available FieldsCurrently build-in and unit-tested fields.NaClCharFieldNaClTextFieldNaClDateTimeFieldNaClIntegerFieldNaClFloatFieldNaClEmailFieldNaClBooleanFieldNaClJSONFieldEncrypt Your Own FieldsMaking new fields can be done by using the providedNaClFieldMixin:fromdjango.dbimportmodelsfromnacl_encrypted_fieldsimportNaClFieldMixinclassNaClIPAddressField(NaClFieldMixin,models.IPAddressField):passPlease report any issues you encounter when trying this.ContributingStart a PostgreSQL Docker container for testing using:dockerrun--rm-ePOSTGRES_PASSWORD=postgresPOSTGRES_DB=github_actionspostgresThen, you can run tests in another window using:python-mvenvenvsourceenv/bin/activate
pipinstall'.[test]'pythonmanage.pytestBefore you contribute, make sure you lint your code:pipinstall'.[lint]'flake8--exclude.git,pycache,docs/conf.py,build,dist,envAfter you code is done, free free to open a new pull request.Referenceshttps://github.com/defrex/django-encrypted-fieldshttps://github.com/orcasgit/django-fernet-fields
Package: django-nadb
django-nadb (Not Another Django Blog app)django-nadb is a Django blog app. The source repository can be found athttps://github.com/earonne/django-nadb/InstallationInstalling django-nadb is as simple as checking out the source and adding it to your project orPYTHONPATH.Use git, pip or easy_install to check out django-nadb fromGithubor get a release fromPyPI.1. Download and install the package from the python package
index (PyPI):easy_install django-nadbor if you prefer pip:pip install django-nadb2. Install the latest development version fromGitHub. This requires to installgitof course:git clone git://github.com/earonne/django-nadb.gitthen install it manually:cd django-nadb
python setup.py installPlease note that the dev version is not fully tested and may contain bugs.Usage1. To install django-nadb just add the package to yourINSTALLED_APPSsetting:# settings.py
INSTALLED_APPS = (
    ...
    'nadb',
    'django_markup',
)

# Notice you also need to add django_markup to your INSTALLED_APPS.2. Run the syncdb
command:$ ./manage.py syncdb3. Add a line like this in your root URLConf to set up the default URLs for
django-nadb:# urls.py
urlpatterns = patterns('',
    url(r'^blog/', include('nadb.urls')),
)4. django-nadb supports markup filters (e.g. Markdown, RestructuredText, etc.).
Add the following to yoursettings.py:# settings.py
NADB_MARKUP_FILTER = 'markdown'

MARKUP_SETTINGS = {
    'markdown': {
        'safe_mode': True,
        'extensions': ['codehilite']
    }
}5. Create anadbdirectory inside your templates directory and add
the following templates:base_nadb.html
post_list.html
post_detail.html
post_archive_year.html
post_archive_month.html
post_archive_day.html
category_list.html
category_detail.html
Package: django-nadmin
Django-xadmin Source project is here:https://github.com/sshwsfc/django-xadminA better reqplacement of django admin && support django 1.8, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.Based on django-xadminFeaturesDrop-in replacement of Django adminTwitter Bootstrap based UI with theme supportExtensible with plugin supportBetter filter, date range, number range, etc.Built-in data export with xlsx, xml and json formatDashboard page with widget supportIn-site bookmarkingFull CRUD methodsScreenshotsGet StartedInstallInstall Nadmin from source, run:cloneordownloadzipfilecddjango-nadminpipinstall-rrequirements.txtpythonsetup.pycleanpythonsetup.pybuildpythonsetup.pyinstallOr Install using PIP:pipinstalldjango-nadminInstall Requiresdjango>=1.7Changelogs0.1.0Do some refactoring to compatible with django 1.8Remove the feature of exporting CSV fileUpdate the images & travis CIMoreRun Demo Locallycddemo_app./manage.pyrunserverOpenhttp://127.0.0.1:8000in your browserYou may need tomigrate & syncdbto create DB and Admin User if you run this demo for the first time