Saravanan666/pypi-org huggingface dataset:
Package: django-money-rates
Currency conversion for moneyDocumentationThe full documentation is athttp://django-money-rates.rtfd.org.QuickstartInstall django-money-rates:pip install django-money-ratesThen use it in a project:import djmoney_ratesIn order to save exchange rates to your database, adddjmoney_ratesto your INSTALLED_APPS in your project’s settings:INSTALLED_APPS = (
    ...
    'djmoney_rates',
    ...
)Setup the Open Exchange Rates backendOpen an account athttps://openexchangerates.org/if you don’t have one already. Then, add this to your project’s settings:DJANGO_MONEY_RATES = {
    'DEFAULT_BACKEND': 'djmoney_rates.backends.OpenExchangeBackend',
    'OPENEXCHANGE_URL': 'http://openexchangerates.org/api/latest.json',
    'OPENEXCHANGE_APP_ID': 'YOUR APP ID HERE',
    'OPENEXCHANGE_BASE_CURRENCY': 'USD',
}For more information on the Open Exchange Rates API, seehttps://openexchangerates.org/Pull the latest Exchange RatesOnce your backend is setup, get the latest exchange rates:$ ./manage.py update_ratesConvert from one currency to anotherHere’s an example of converting 10 Euros to Brazilian Reais:frommoneyedimportMoneyfromdjmoney_rates.utilsimportconvert_moneybrl_money=convert_money(10,"EUR","BRL")FeaturesConvert money from one currency to another with an easy to use API.TODO ListAdd money converter wrapper for util’sconvert_moneyfunction.Add celery periodic task for getting daily exchange rates.History0.3.0 (2013-12-30)convert_moneyutility function now returns moneyed.Money instances0.1.0 (2013-10-16)First release on PyPI.
Package: django-money-rates-nb
Currency conversion for moneyDocumentationThe full documentation is athttps://django-money-rates.readthedocs.io/.QuickstartInstall django-money-rates:pip install django-money-ratesThen use it in a project:import djmoney_ratesIn order to save exchange rates to your database, adddjmoney_ratesto your INSTALLED_APPS in your project’s settings:INSTALLED_APPS = (
    ...
    'djmoney_rates',
    ...
)Setup the Open Exchange Rates backendOpen an account athttps://openexchangerates.org/if you don’t have one already. Then, add this to your project’s settings:DJANGO_MONEY_RATES = {
    'DEFAULT_BACKEND': 'djmoney_rates.backends.OpenExchangeBackend',
    'OPENEXCHANGE_URL': 'http://openexchangerates.org/api/latest.json',
    'OPENEXCHANGE_APP_ID': 'YOUR APP ID HERE',
    'OPENEXCHANGE_BASE_CURRENCY': 'USD',
}For more information on the Open Exchange Rates API, seehttps://openexchangerates.org/Pull the latest Exchange RatesOnce your backend is setup, get the latest exchange rates:$ ./manage.py update_ratesConvert from one currency to anotherHere’s an example of converting 10 Euros to Brazilian Reais:frommoneyedimportMoneyfromdjmoney_rates.utilsimportconvert_moneybrl_money=convert_money(10,"EUR","BRL")FeaturesConvert money from one currency to another with an easy to use API.TODO ListAdd money converter wrapper for util’sconvert_moneyfunction.Add celery periodic task for getting daily exchange rates.
Package: django-mongo-auth
Djangoauthentication based on an extensibleMongoEngineuser class.It supports common authentication providers (Facebook, Google, Twitter,
Foursquare, BrowserID/Persona, …) and a traditional on-site registration workflow
with e-mail address confirmation. Additionally, anonymous users are given a
temporary account instance which can then be converted to an authenticated one.
Each account can be linked with multiple authentication providers.Documentation is found at:http://django-mongo-auth.readthedocs.org/
Package: django-mongo-coupons
# django-mongo-coupons<!--![build status](https://travis-ci.org/byteweaver/django-coupons.png)-->A mongoengine implementaion of [django-coupons](https://github.com/byteweaver/django-coupons "Django-coupons"), A reuseable Django application for coupon gereration and handling.Is not compatible with relational db Auth User## Setup instructions1. Install `django-mongo-coupons` via pip:```$ pip install django-mongo-coupons```2. Add `'mongo_coupons'` to `INSTALLED_APPS` in `settings.py`.```PythonINSTALLED_APPS = [...'mongoengine''rest_framework_mongoengine','mongo_coupons'...]```3. Include `mongo_coupons.urls` in urls.py```Pythonurlpatterns += [ url(r'^coupons/', include(coupon_urls)) ]```## Dependencies* [mongoengine]('http://mongoengine.org/')* [django-rest-framework]('http://www.django-rest-framework.org/')* [django-rest-framework-mongoengine]('https://github.com/umutbozkurt/django-rest-framework-mongoengine.git')* [django-mongoengine]('https://github.com/MongoEngine/django-mongoengine.git') # unstable project, needed if`AUTH_USER_MODEL` is not defined.## Supported use cases of couponsSupports all coupons supported by  [django-coupons](https://github.com/byteweaver/django-coupons "Django-coupons") and few more:* single time (default): coupon can be used one time without being bound to an user.* user limited: coupon can be used one time but only by a specific user.* limit number: coupon can be used a limited number of times, by any user once.* users list: coupon can be used by a defined list of users, each once.* unlimited: coupon can be used unlimited times, but only once by the same user.* usage limited: type of coupon can be any of the above but can be used only n times## Example###### Request$ curl 'http://localhost:8000/coupons/coupons/'\-H 'Accept: application/json; indent=4'\-H 'Content-Type: application/json'\-X POST -d '{"value": 50,"code": "","type": "percentage","user_limit": 3,"campaign": "5857afaf86a5c70681a5b783","max_discount": "500"}'<sup>* campain: _id of the campain</sup>###### Response{"id": "58590b3d86a5c770e85db279","value": 50,"code": "KijWCoTI8xUI7tc","max_discount": 500,"type": "percentage","user_limit": 3,"usage_limit": 1,"created_at": "2016-12-20T10:42:25.701545","valid_until": null,"kwargs": null,"campaign": "5857afaf86a5c70681a5b783"}
Package: django-mongodb-cash-backend
The only Django MongoDB Cache backend you need.Installation and UsageInstall with:pip installdjango-mongodb-cash-backendAdd the following to your Django settings:CACHES = {
    'default': {
        'BACKEND': 'django_mongodb_cash_backend.MongoDBCache',
        "LOCATION": "DEFAULT",
        "TIMEOUT": 86400,
        "OPTIONS": {
            "HOST": "MongoDB_host",
            "PORT": 12345,
            "USERNAME": "username_if_desired",
            "PASSWORD": "password_if_needed"
        },
    }
}TipsOn your MongoDB database, you should consider creating an index
on the “expires” field. Culling old cache entries will be much
faster and performance overall will be improved.
Package: django-mongodb-engine
Documentation onhttp://django-mongodb-engine.readthedocs.org/Use Django’s ORM (including Aggregations, Atomic Updates, Embedded Objects,
Map/Reduce and GridFS), admin site, authentication, site, session and caching
frameworks with MongoDB.master branch:ContributingYou are highly encouraged to participate in the development, simply use
GitHub’s fork/pull request system.
If you don’t like GitHub (for some reason) you’re welcome
to send regular patches to the mailing list.Web site:http://www.django-nonrel.org/Mailing list:http://groups.google.com/group/django-non-relationalBug tracker:https://github.com/django-nonrel/mongodb-engine/issues/PyPI:http://pypi.python.org/pypi/django-mongodb-engine/License:2-clause BSDKeywords:django, mongodb, orm, nosql, database, python
Package: django-mongodb-engine-py3
Documentation onhttp://django-mongodb-engine.readthedocs.org/Use Django’s ORM (including Aggregations, Atomic Updates, Embedded Objects,
Map/Reduce and GridFS), admin site, authentication, site, session and caching
frameworks with MongoDB.master branch:ContributingYou are highly encouraged to participate in the development, simply use
GitHub’s fork/pull request system.
If you don’t like GitHub (for some reason) you’re welcome
to send regular patches to the mailing list.Web site:http://www.django-nonrel.org/Mailing list:http://groups.google.com/group/django-non-relationalBug tracker:https://github.com/django-nonrel/mongodb-engine/issues/PyPI:http://pypi.python.org/pypi/django-mongodb-engine/License:2-clause BSDKeywords:django, mongodb, orm, nosql, database, python
Package: django-mongoengine-filter
django-mongoengine-filteris a reusable Django application for allowing
users to filtermongoengine querysetsdynamically. It’s very similar to
populardjango-filterlibrary and is designed to be used as a drop-in
replacement (as much as it’s possible) strictly tied toMongoEngine.Full documentation onRead the docs.RequirementsPython 3.7, 3.8, 3.9, 3.10 or 3.11.MongoDB 3.x, 4.x, 5.x.Django 2.2, 3.0, 3.1, 3.2, 4.0 or 4.1.InstallationInstall using pip:pipinstalldjango-mongoengine-filterOr latest development version:pipinstallhttps://github.com/barseghyanartur/django-mongoengine-filter/archive/master.zipUsageSample documentfrommongoengineimportfields,documentfrom.constantsimportPROFILE_TYPES,PROFILE_TYPE_FREE,GENDERS,GENDER_MALEclassPerson(document.Document):name=fields.StringField(required=True,max_length=255,default="Robot",verbose_name="Name")age=fields.IntField(required=True,verbose_name="Age")num_fingers=fields.IntField(required=False,verbose_name="Number of fingers")profile_type=fields.StringField(required=False,blank=False,null=False,choices=PROFILE_TYPES,default=PROFILE_TYPE_FREE,)gender=fields.StringField(required=False,blank=False,null=False,choices=GENDERS,default=GENDER_MALE)def__str__(self):returnself.nameSample filterimportdjango_mongoengine_filterclassPersonFilter(django_mongoengine_filter.FilterSet):profile_type=django_mongoengine_filter.StringFilter()ten_fingers=django_mongoengine_filter.MethodFilter(action="ten_fingers_filter")classMeta:model=Personfields=["profile_type","ten_fingers"]deften_fingers_filter(self,queryset,name,value):ifvalue=='yes':returnqueryset.filter(num_fingers=10)returnquerysetSample viewWith function-based views:defperson_list(request):filter=PersonFilter(request.GET,queryset=Person.objects)returnrender(request,"dfm_app/person_list.html",{"object_list":filter.qs})Or class-based views:fromdjango_mongoengine_filter.viewsimportFilterViewclassPersonListView(FilterView):filterset_class=PersonFiltertemplate_name="dfm_app/person_list.html"Sample template<ul>{% for obj in object_list %}<li>{{ obj.name }} - {{ obj.age }}</li>{% endfor %}</ul>Sample requestsGET /persons/GET /persons/?profile_type=free&gender=maleGET /persons/?profile_type=free&gender=femaleGET /persons/?profile_type=member&gender=femaleGET /persons/?ten_fingers=yesDevelopmentTestingTo run tests in your working environment type:pytest-vrxTo test with all supported Python versions type:toxRunning MongoDBThe easiest way is to run it via Docker:dockerpullmongo:latestdockerrun-p27017:27017mongo:latestWriting documentationKeep the following hierarchy.=====
title
=====

header
======

sub-header
----------

sub-sub-header
~~~~~~~~~~~~~~

sub-sub-sub-header
^^^^^^^^^^^^^^^^^^

sub-sub-sub-sub-header
++++++++++++++++++++++

sub-sub-sub-sub-sub-header
**************************LicenseGPL-2.0-only OR LGPL-2.1-or-laterSupportFor any security issues contact me at the e-mail given in theAuthorsection.For overall issues, go toGitHub.AuthorArtur Barseghyan <artur.barseghyan@gmail.com>
Package: django-mongoengine-rql
Django Mongoengine RQLIntroductionRQL (Resource query language) is designed for modern application development. It is built for the web, ready for NoSQL, and highly extensible with simple syntax.
This is a query language for fast and convenient database interaction. RQL was designed for use in URLs to request object-style data structures.This library is a Django-Mongoengine specific implementation of RQL filtering.RQL ReferenceDjango RQLDjango MongoengineInstallDjango Mongoengine RQLcan be installed frompypi.orgusing pip:$ pip install django-mongoengine-rqlDocumentationThis library is fully based onDjango RQL, so there are no specific docs for it.
Full documentation for Django-RQL is available athttps://django-rql.readthedocs.org.Example# filters.pyfromdj_mongoengine_rql.filter_clsimportMongoengineRQLFilterClassfrompy_rql.constantsimportFilterLookupsfromyour_docsimportDocumentclassDocFilters(MongoengineRQLFilterClass):MODEL=DocumentSELECT=TrueFILTERS=('filter1',{'filter':'filter2','source':'related_doc__doc_field',},{'namespace':'ns1','filters':('ns1f',),},{'filter':'filter3','lookups':{FilterLookups.EQ,FilterLookups.IN},},)# views.pyfromdj_rql.drf.backendimportRQLFilterBackendfromdj_rql.drf.paginationsimportRQLContentRangeLimitOffsetPaginationfromrest_frameworkimportmixinsfromrest_framework.viewsetsimportGenericViewSetclassDRFViewSet(mixins.ListModelMixin,GenericViewSet):queryset=Document.objects.all()rql_filter_class=DocFilterspagination_class=RQLContentRangeLimitOffsetPaginationfilter_backends=(RQLFilterBackend,)NotesDue to implementation and Mongo engine features there may be some limitations in filtering, for example:distinctsetting is not supported for filtersannotations are not supported, as wellDevelopmentPython 3.8+Install dependenciespip install poetry && poetry installWe useisortlibrary to order and format our imports, andblack- to format the code.
We check it usingflake8-isortandflake8-blacklibraries (automatically onflake8run).For convenience you may rundocker compose run formatto format the code.TestingPython 3.8+Install dependenciespip install poetry && poetry installCheck code style:poetry run flake8Run tests:poetry run pytestRun integration tests:docker compose run app_testTests reports are generated intests/reports.out.xml- JUnit test resultscoverage.xml- Coverage xml resultsTo generate HTML coverage reports use:--cov-report html:tests/reports/cov_htmlLicenseDjango Mongoengine RQLis released under theApache License Version 2.0.
Package: django-mongo-sessions
info:mongodb as Django sessions backendfeaturesfast NoSQL Django sessions backendinvalidation viaTTLinstallationrunpip installdjango-mongo-sessionssetmongo_sessions.sessionas session engine:SESSION_ENGINE = 'mongo_sessions.session'settingsthere is two ways to setup mongodb connection atsettings.pyfirst, if already have mongo connection, like:import pymongo
from pymongo import MongoClient
connection = MongoClient()
MONGO_CLIENT = connection.your_database
MONGO_SESSIONS_COLLECTION = 'mongo_sessions' # default optionsecond, if you need to connect to mongodb, like:MONGO_PORT = 27017
MONGO_HOST = 'localhost'
MONGO_DB_NAME = 'test'
MONGO_DB_USER = False
MONGO_DB_PASSWORD = False
MONGO_SESSIONS_COLLECTION = 'mongo_sessions'

# all this settings are defaults, you can skip anyexpireAfterSecondsindex value by default isSESSION_COOKIE_AGEyou can change:MONGO_SESSIONS_TTL = 60 * 60 # one hourbe sure, that you know what are you doing with it,SESSION_COOKIE_AGEwill get different expiration timeevery time you change one of this values,expireAfterSecondsindex
will be dropped and then will be indexed withensureIndexagain,
be careful hereit is good way to change expireAfterSeconds only by 1 running instancetestspip install tox
tox
Package: django-mongo-storage
A helper app for using MongoDB’s GridFS as a storage backend for django.mongo_storage contents include:models.pyMongoFileModel: a model mixin creating a MongoFileField called contentMongoDeleteFileModel: a model mixin that will delete the underlying
file when the model is deletedfields.pyMongoFileField: a custom file field that gives you access to the
file name through a ‘file_name’ property. Useful because the
GridFSStorage makes Django store the MongoDB ObjectId instead
of the file name.storage.pyGridFSStorage: the Django storage module to interact with the pymongo,
MongoDB’s python adaptersadmin.pyMongoFileAdminMixin: gives the ModelAdmin access to the stored
file’s file name and file size.DeleteActionMixin: allows ModelAdmin to call the delete method on
each model being deleted (so the underlying file will be delete
also) when deleting items in bulk.Dependencies:mongodb Databasepymongodjango
Package: django-monitor-client
=====django-monitor-client=====django-monitor-client is a simple Django app to send project infomation to server.Quick start-----------1. Add "monitor_client" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'monitor_client',)2. Include the django-monitor-client URLconf in your project urls.py like this::url(r'^monitor_client/v1', include("monitor_client.urls")),3. Add vars in setting file.MONITOR_SERVER_PUSH_URL (to post data url)PROJIECT_DOMAIN (your project domain)3. Restart your project to register your project.
Package: django-monitor-consent
Django consent appThis app provides a configurable notice of consent banner for Django.
It uses Bootstrap CSS classes including container, alert, and alert-secondary.Installationpip install django-monitor-consentAddconsenttoINSTALLED_APPSSetCONSENT_TEXTin your settings:CONSENT_TEXT="This computer system is provided only for authorized use..."Include the banner template in your login page:{% include "consent/banner.html" %}The text is automatically wrapped in paragraph tags.
Put two line endings in the text to create a new paragraph.
Package: django-monitoring
DO NOT USE THIS. Work in progress.A reusable Django app to monitor all aspects of your webapp.The idea is to create an app that provides some APIs that can be re-used
by any other app.Let’s say you want to create a graph that shows how many users sign up at your
site every day.First you will create a model that can hold this data. django-monitoring will
provide some abstract base classes for commonly used model types:class MonitorUserCount(MonitorCountBase, models.Model):
    passNext you will register a new monitor that is connected to that monitor model:from monitoring import monitor
from myapp.models import MonitorUserCount

monitor.register('user_count', UserRegistrationCount)Now you can add one count to this monitor anywhere in your code:from monitoring import monitor

def post_registration__handler(sender, user, *args, **kwargs):
    monitor.add('user_count', 1)django-monitoring will figure out, that theuser_countmonitor is connected
to theMonitorUserCountmodel and it will also know that this model is
of the typeMonitorCountBasewhich will know how to add one data point to
itself. In this case it would just add a row to the table which says that 1
user was added attimezone.now().Finally django-monitoring provides a view which will show graphs for all
connected monitors. I still have to think about how to teach that view which
monitors to show, how to render the data and how to filter the data.The base classes will probably have an attribute which describes the default
template but you could easily override those templates for your app.InstallationTo get the latest stable release from PyPi (not yet released!)$pipinstalldjango-monitoringTo get the latest commit from GitHub$pipinstall-egit+git://github.com/bitmazk/django-monitoring.git#egg=monitoringAddmonitoringto yourINSTALLED_APPSINSTALLED_APPS=(...,'monitoring',)Add themonitoringURLs to yoururls.pyurlpatterns=patterns('',...url(r'^monitoring/',include('monitoring.urls')),)Don’t forget to migrate your database./manage.pymigratemonitoringUsageTODO: Describe usage or point to docs. Also describe available settings and
templatetags.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your fork$mkvirtualenv-ppython2.7django-monitoring$pythonsetup.pyinstall$pipinstall-rdev_requirements.txt$gitco-bfeature_branchmaster# Implement your feature and tests$gitadd.&&gitcommit$gitpush-uoriginfeature_branch# Send us a pull request for your feature branch
Package: django_monitor_psutil
=====Monitor=====Monitor exposes a JSON endpoint to your system to check on system informationQuick start-----------1. Add "monitor" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'monitor',]2. Include the monitor URLconf in your project urls.py like this::url(r'^stats/', include('monitor.urls')),4. Start the development server and GET http://127.0.0.1:8000/stats/to get the JSON (You may want to enable CORS, if consuming directly from a browser).
Package: django-monitus
Tiny error reporting middleware(s) for Django. Includes the following middlewares:Error403EmailsMiddleware: sends an email toADMINSon 403.FailedLoginMiddleware: sends an email toADMINSon failed logins.RequirementsTested on Python 3.8.Tested on Django 3.0 and 3.1.SetupInstall from pip:python-mpipinstalldjango-monitusThen add it to the list of installed apps:INSTALLED_APPS=[..."monitus"...]Enable the desired middleware:MIDDLEWARE=[..."monitus.middleware.Error403EmailsMiddleware"...]SetupADMINSin your settings:MANAGERS=[("Juliana C.","juliana.crain@dev.io")]Development and testingTo test on your local machine with Postgres, make sure to have a role with enough privileges:CREATEROLEmonitustestuserWITHLOGINPASSWORD'monitustestpassword'CREATEDB;Then runDATABASE_URL=postgres://monitustestuser:monitustestpassword@localhost/monitustestdbtox
Package: django-monkey-patches
django-monkey-patchesA collection of monkey patches to improve Django frameworkUseEach monkey-patchbeautiful_patchshould be available with a functionapply_beautiful_patch().
Hence, all you have to do is:fromdjango_monkey_patches.django__beautiful_class__beautiful_patchimportapply_beautiful_patchapply_beautiful_patch()For example, you can do it in your Django settings.py file or in a file imported in settings.py.Choosing a patchLook at the source code on GitHub.
The rational behind each patch is given in the source code file.
If you cannot bother reading the source code of a patch of ten or twenty lines,
you probably should not apply it anyway ;).F.A.Q.Why does the version not follow Django versions?Because I plan to add monkey-patches for other packages around Django itself.
For example, Django Rest Framework (DRF) is in "maintenance mode only".
It does not accept new features and is only updated to keep compatibility with new versions of Django.
Moreover, many patches wil be plainly compatible with most versions of Django,
and I don't see the need of multiplying versions.
So instead, I use semantic versioning relative to the proposed patches.Why is Django not a dependency?See previous question.Why is there no tests folder?See previous question.
Package: django-monkey-team
This is a middleware that displays debug tracebacks on production sites (where
you would haveDEBUG = False) only to developers. Developers have to install a
special userscript to decode the traceback data. AES-256 (CBC mode) is used to
encrypt the traceback. The decode key and client key are hashes of your
SECRET_KEY with salts so your SECRET_KEY is safe even if your userscript gets in
the wrong place.Google Chrome and Firefox are supported. If you want to use something else you
have to find a way to install the userscript yourself.There’s also a decode page in the admin in case you get user reports with the
encrypted data.The error page and decrypt flow looks like this:Installation guideInstall it:pip install django-monkey-teamChange your Django project settings to have:INSTALLED_APPS += (
    'monkey_team',
)
MIDDLEWARE_CLASSES += (
    'monkey_team.middleware.MonkeyTeamMiddleware',
)
DEBUG = FalseNote, that if you wantDEBUG = Trueand still have the middleware on you need to set:MONKEY_FORCE_ACTIVE = TrueThen go to django admin and install the userscript. The setup page looks like
this:RequirementsPyCrypto is required.The project has been tested on Django 1.3, 1.4, 1.5 and trunk with Python 2.6 and
2.7.
Package: django-monkeytranslate
Small utility app for monkeypatching Django do_translate functions.
It enables you to easily mark translations by wrapping them in curly braces,
or do more funky stuff like override how static translations are
handled completely.InstallInstall into your python environment of choice using pip from
the parent folder:pip install django-monkeytranslateSettingsIn your settings file include:MONKEYTRANSLATE_ENABLED = TrueAnd if you want to define the callable:MONKEYTRANSLATE_CALLABLE = callableTake a look at monkeytranslate.utils for an example of a callable tomonkeypatchdjango.utils.translation.trans_real.do_translate