Saravanan666/pypi-org huggingface dataset:
Package: django-openportfolio
#Open PortfolioOpen source django project for portfolio management.  Aims to open up asset management tools used by professional fund managers.More information at: [project homepage](http://evandavey.github.com/OpenPortfolio/)#Change Historyv0.1:implements basic functionalitycreate / edit objects through the django admin interfacetrades can be uploaded as csv or ofxportfolios can be grouped and assigned benchmarkshandles investments and reporting in cross currenciesmanagement command to download prices, can be run as a scheduled taskHighcharts price charts for portfolios and investmentsbenchmark relative portfolio report showing holdings and returns over timeinvestment report showing price chart and other pricing datapandas dataframes and panels used in backend giving substantial flexibility for future reporting enhancements (such as risk calculations, risk weighting analysis, gips compliant returns calcs…)fifo / lifo trade allocations for profit calculations#InstallationSee [installation](http://evandavey.github.com/OpenPortfolio/installation.html)#Project documentationSee [project docs](http://evandavey.github.com/OpenPortfolio/)#AuthorEvan Davey,evan.j.davey@gmail.com, www.twitter.com/evanjdavey/
Package: django_openS3
django_openS3An openS3 wrapper for use with Django.Installation$ pip install django_openS3To install the latest development version:$ git clone git@github.com:logston/django_openS3.git
$ cd django_openS3
$ python setup.py installUsage# Add django_openS3 to your project's list of installed apps.
INSTALLED_APPS = [
    ...
    'django_openS3',
    ...
]

# Set your desired bucket and authentication/authorization info.
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_S3_BUCKET']
AWS_ACCESS_KEY_ID = os.environ['AWS_S3_ACCESS_KEY']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_S3_SECRET_KEY']

# Tell django to use django_openS3 for storing static files and media.
DEFAULT_FILE_STORAGE = 'django_openS3.storage.S3MediaStorage'
STATICFILES_STORAGE = 'django_openS3.storage.S3StaticStorage'

# Optionally set the directories in which static and media
# files will be saved to. Defaults are listed below.
S3_STATIC_DIR = '/static/'
S3_MEDIA_DIR = '/media/'Bug TrackerPlease report bugs!!Report bugs at django_openS3’s GitHub repo.Further DocumentationFurther documentation can be found onRead the Docs.
Package: django-opensearch
django-opensearch is a Django reusable application to handle opensearch.xmlContentsInstallationConfigurationUsageSettingsContributingLicensingContactsInstallationObtain your copy of source code from the git repository:$ git clonehttps://github.com/vint21h/django-opensearch.git. Or download the latest release fromhttps://github.com/vint21h/django-opensearch/tags/.Run$ python ./setup.py installfrom the repository source tree or unpacked archive. Or use pip:$ pip installdjango-opensearch.ConfigurationAdd"opensearch"tosettings.INSTALLED_APPS.# settings.pyINSTALLED_APPS+=["opensearch",]Add"opensearch"to your URLs definitions.# urls.pyfromdjango.urlsimportre_pathurlpatterns+=[re_path(r"^opensearch/",include("opensearch.urls")),]UsageLoad"opensearch_tags"to your base template and place opensearch rel meta tag to <head> HTML tag by calling{% opensearch_meta %}.{# base.html #}{%loadopensearch_tags%}<head>{%opensearch_meta%}</head>SettingsOPENSEARCH_CONTACT_EMAILContains an email address at which the maintainer of the description document can be reached. Defaults to"".OPENSEARCH_SHORT_NAMEContains a brief human-readable title that identifies this search engine. Defaults to"".OPENSEARCH_DESCRIPTIONContains a human-readable text description of the search engine. Defaults to"".OPENSEARCH_FAVICON_WIDTHContains width of an image that can be used in association with this search content. Defaults to16.OPENSEARCH_FAVICON_HEIGHTContains height of an image that can be used in association with this search content. Defaults to16.OPENSEARCH_FAVICON_TYPEContains mimetype of an image that can be used in association with this search content. Defaults to"image/x-icon".OPENSEARCH_FAVICON_FILEContains a URL that identifies the location of an image that can be used in association with this search content. Defaults to"favicon.ico".OPENSEARCH_SEARCH_URLContains a Django URL name to search content. Defaults to"search".OPENSEARCH_SEARCH_QUERYSTRINGContains the querystring to prepend to search parameter. Defaults to"q=".OPENSEARCH_INPUT_ENCODINGContains a string that indicates that the search engine supports search requests encoded with the specified character encoding. Defaults to"UTF-8".ContributingFork itInstallGNU MakeInstall and configurepyenvandpyenv-virtualenv pluginInstall and configuredirenvCreate environment config from examplecp.env.example.envInstall development dependencies:makeinstallCreate your fix/feature branch:gitcheckout-bmy-new-fix-or-featureCheck code style and moreover:makecheckRun tests:maketestPush to the branch:gitpushoriginmy-new-fix-or-featureCreate a new Pull RequestLicensingdjango-opensearch is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
For complete license text see COPYING file.ContactsProject Website:https://github.com/vint21h/django-opensearch/Author: Alexei Andrushievich <vint21h@vint21h.pp.ua>For other authors list see AUTHORS file.
Package: django-openstack
OpenStack Django-Nova---------------------The Django-Nova project is a Django module that is used to provide web basedinteractions with the OpenStack Nova cloud controller.There is a reference implementation that uses this module located at:http://launchpad.net/openstack-dashboardIt is highly recommended that you make use of this reference implementationso that changes you make can be visualized effectively and are consistent.Using this reference implementation as a development environment will greatlysimplify development of the django-nova module.Of course, if you are developing your own Django site using django-nova, thenyou can disregard this advice.Getting Started---------------Django-Nova uses Buildout (http://www.buildout.org/) to manage localdevelopment.  To configure your local Buildout environment first install the followingsystem-level dependencies:* python-dev* git* bzrThen instantiate buildout with$ python bootstrap.py$ bin/buildoutThis will install all the dependencies of django-nova and provide some usefulscripts in the bin/ directory:bin/python provides a python shell for the current buildout.bin/django provides django functions for the current buildout.You should now be able to run unit tests as follows:$ bin/django testor$ bin/testYou can run unit tests with code coverage on django_openstack by settingNOSE_WITH_COVERAGE:$ NOSE_WITH_COVERAGE=true bin/testGet even better coverage info by running coverage directly:$ coverage run --branch --source django_openstack bin/django test django_openstack && coverage html
Package: django_openstack_auth
Team and repository tagsDjango OpenStack AuthDjango OpenStack Auth is a pluggable Django authentication backend that
works with Django’scontrib.authframework to authenticate a user against
OpenStack’s Keystone Identity API.The current version is designed to work with the Keystone v2.0 and v3 API.You canview the installation instructionson Read The Docs.License: Apache License, Version 2.0Documentation:http://django-openstack-auth.readthedocs.org/en/latest/Source:http://git.openstack.org/cgit/openstack/django_openstack_auth/Bugs:https://bugs.launchpad.net/django-openstack-auth
Package: django-openstack-auth-kerberos
django-openstack-auth-kerberos provides a way to extenddjango-openstack-authto allow kerberos login
via S4U2 Proxy. It separates the code and additional dependencies required so
that they are not required as part of the base DOA requirements.For installation instructions please consult the docs.Free software: Apache licenseDocumentation:http://docs.openstack.org/developer/django-openstack-auth-kerberosSource:http://git.openstack.org/cgit/openstack/django-openstack-auth-kerberosBugs:http://bugs.launchpad.net/django-openstack-auth-kerberos
Package: django_openstack_auth.multi_regions
宝德云多区域切换库 (http://console.plcloud.com)依赖django_openstack_auth >= 1.1.4配置方法修改openstack_dashboard/urls.py文件, 替换auth url- url(r'^auth/', include('openstack_auth.urls'))
+ url(r'^auth/', include('openstack_auth.multi_regions.urls'))修改openstack_dashboard/settings.py文件, 添加multi_regions appINSTALLED_APPS = (
    '''
    'openstack_auth.multi_regions',
    '''
)配置local_settings.py, 添加MULTI_REGIONSfrom openstack_auth.multi_regions import i18n as mt_i18n
'''
MULTI_REGIONS = [
    ('http://10.0.0.1:5000/v2.0', 'beijing', 'BeiJing-1(PEK-1)'),
    ('http://172.16.0.1:5000/v2.0', 'shenzhen', 'ShenZhen-1(SZX-1)'),
    ('http://192.168.100.1:5000/v2.0', 'lab-test', 'Lab-Test-1(Lab-1)'),
]
MULTI_REGIONS = mt_i18n(MULTI_REGIONS)
OPENSTACK_KEYSTONE_URL = MULTI_REGIONS[0][0]
Package: django-openstax-accounts
django-openstax-accountsis a Django app to read data
from the logged-in user’s OpenStax account using the SSO cookie.Quick startAdd the following settings to your settings file:# OpenStax Accounts settings
SSO_COOKIE_NAME = "<oxa_env>"
SSO_SIGNATURE_PUBLIC_KEY = "<public_key_for_accounts>"
SSO_ENCRYPTION_PRIVATE_KEY = "<private_key_for_accounts>"UsageIf you need to access the current user’s OpenStax account UUID,
you can use theget_logged_in_user_uuidfunction fromopenstax_accounts.functions.
This function will a UUID.:from django.shortcuts import render
from openstax_accounts.functions import get_logged_in_user_uuid

def my_view(request):
    user_uuid = get_logged_in_user_uuid(request)
    # function to do something with the uuid, like save it to your database or use for an API call
    return render(request, "my_template.html", {"user_uuid": user_uuid})
Package: django-openstax-healthcheck
django-openstax-healthcheckis a Django middleware to intercept/pingand/ping/requests from AWS.
This is required when using OpenStax IaC for deployment.Quick startAdd the following settings to your settings file::# Add to middleware, be sure it's before CommonMiddleware
MIDDLEWARE = [
    # ... (optional before)
    'healthcheck.middleware.HealthCheckMiddleware',
    # ... (optional between)
    'django.middleware.common.CommonMiddleware',
    # ... (optional after CommonMiddleware)
]UsageAdd something like this to your logging configuration:import logging
logging.config.dictConfig({
    # ...
    'filters': {
        'healthcheck_filter': {
            '()': 'healthcheck.filter.HealthCheckFilter'
        },
    },
    # ...
})
Package: django-opentracing-logger
0. TODOdjango-opentracing-logger is a django opentracing SDK based on logger which focus on ease to use.
This project mainly works now, but we need to do a little work to let it works with official
opentracing since it was built for a dialect of opentracing schema(90% of the schema were the same).1. install# current 0.0.1pipinstalldjango-opentracing-logger2. config opentracing logger# settings.pyfromdjango_opentracing_logger.opentracing.tracerimportset_log_tracer# add request middlewareMIDDLEWARE=['django_opentracing_logger.opentracing.middleware.DDTracerMiddleware',]# add loggerLOGGING={'filters':{'trace_id':{'()':'django_opentracing_logger.opentracing.logging.TraceIDFilter',}},'formatters':{# ...,'trace':{'()':'pythonjsonlogger.jsonlogger.JsonFormatter','fmt':'%(message)s',}},'handlers':{# ...,'trace':{'level':'INFO','class':'django_opentracing_logger.opentracing.logging.TraceHandler','filename':'%s/trace.log'%'/data/logs/trace','backupCount':10,'when':'D','interval':1,'formatter':'trace'}},'loggers':{'tracer':{'handlers':['trace'],'propagate':True,'level':'DEBUG'},}}# init tracerAPM_ENABLE=TrueifAPM_ENABLE:set_log_tracer("PROJECT_NAME")# TODO replace PROJECT_NAME with your real project name3. collectcollect logs in/data/logs/trace4. viewuse any viewer which Compatible with opentracing.
Package: django-opqpwd
opqpwd is a password manager REST service withclient-side encryption.It is written in Python 3, usingDjangoandDjango REST framework.opqpwd stands for “opaque passwords”: it encrypts password on the client-side,
making them “opaque” to the server.
Moreover, user registration and authentication is performed using salted hashes
of user-chosen username and password:
this boosts users anonimity with respect to traditional services, hiding even
the service-registration username.Passwords (and metadata) are stored in your favorite database as Base64-encoded,
encrypted JSON.
Encryption is performed using AES-256-CBC, with HMAC-SHA-256 authentication.scryptis used as key derivation function.It features an example command-line client (you can find it in
the bin folder).opqpwd was written by Marco Bellaccini - marco.bellaccini(at!)gmail.com.BEWARE: OPQPWD IS PROOF-OF-CONCEPT SOFTWARE, FOR TESTING PURPOSES ONLY.Quick startMake sure you meet all software dependencies (Django REST Framework,
scrypt - you’ll need libssl-dev for it, pycrypto, requests and, of course, Django).Add “opqpwd” and “rest_framework” (of course, you have to install
Django REST Framework too!) to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'rest_framework',
    'opqpwd',
]In the same file (settings.py), specify this custom authentication backend:# set custom authentication backend
AUTHENTICATION_BACKENDS = ['opqpwd.authentication.UserCredBackend']Include the opqpwd URLconf in your project urls.py like this:url(r'^', include('opqpwd.urls')),Note: make sure you import include withfrom django.conf.urls import include.Runpython manage.py migrateto create the opqpwd models.Start the development server (BEWARE: in a real environment you should run
it over https, however, as already stated, THIS IS A PROOF-OF-CONCEPT
SOFTWARE, FOR TESTING PURPOSES ONLY).Start the cli-client script:opqpwdcliclientNote: if you installed the package as a user library, the script will
likely be in.local/binin your home folder.Connect to the development server:connect http://127.0.0.1:8000Register a user:adduser(if you want, you can also generate an authentication token to use along
with the password)Login:loginAdd a password to the db:addpasswordList all stored passwords titles:printallPrint details of the password you just stored:print 1Upload encrypted passwords to the server:saveGet help with the other commands:help
Package: django-ops
Django_Ops is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “django_ops” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'django_ops',
]Include the polls URLconf in your project urls.py like this:path('ops/', include('django_ops.urls')),Runpython manage.py migrateto create the polls models.Start the development server.Visithttp://127.0.0.1:8000/ops/.
Package: django-opstasks
Django_opstasks is a distributed task queue that integratescelery/celery,celery/django-celery-beat,celery/django-celery-resultsusing theDjangoORM/Cache frameworkDjango:https://www.djangoproject.com/celery/celery:https://github.com/celery/celery/celery/django-celery-beat:http://github.com/celery/django-celery-beatcelery/django-celery-results:http://github.com/celery/django-celery-resultsThanks to the authors and maintainers of the above software
Package: django-optimistic-admin-pg
django-optimistic-admin-pgThis app provides a couple of mixins to implementoptimistic concurrencyin the Django admin leveraging
PostgreSQL specific features.PostgreSQL implements an MVCC concurrency model, that means that rows are duplicated on update.
PostgreSQL stores an id on each row to store the transaction identifier calledxmin.This application provides mixins for DjangoModelFormandModelAdminusing thexminvalue
to inhibit the saving of data via the Django admin if it has been updated in the meantime.Notes on safetyPlease note that this application does not remove completely the races between updates via the admin
interfaces but it narrows them by a lot.Similar Projectsdjango-concurrencyimplements the same pattern withbatteries includedin adatabase-independentway.RequirementsThe app is tested on Python 3.8+ with Django 3.2 and 4.0.Setuppython-mpipinstalldjango-optimistic-admin-pgHow to useThis application provides a couple of mixins: one forModelAdmininstances and one forModelForminstances.First aModelForminheriting fromOptimisticAdminModelFormMixinshould be used as form theModelAdmin.
A field calledrow_versionshould be added to this form in order to send the row version read
from the database.
Assuming you have forms informs.py:fromdjangoimportformsfromoptimisticadmin.mixinsimportOptimisticAdminModelFormMixinclassMyModelForm(OptimisticAdminModelFormMixin,forms.ModelForm):row_version=forms.IntegerField(required=False,widget=forms.HiddenInput())Then inadmin.pyyourModelAdminneed to inherit fromOptimisticAdminMixinand use the form
implemented before:fromdjango.contribimportadminfromoptimisticadmin.mixinsimportOptimisticAdminMixinfrom.formsimportMyModelForm@admin.register(MyModel)classMyModelAdmin(OptimisticAdminMixin,admin.ModelAdmin):form=MyModelForm
Package: django-optimistic-lock
Implements an offline optimistic lock[1]for Django models.UsageAdd aVersionFieldand inherit fromVersionedMixin.fromoolimportVersionField,VersionedMixinclassMyModel(VersionedMixin,models.Model):version=VersionField()WheneverMyModelis saved, the version will be checked to ensure
the instance has not changed since it was last fetched. If there is a
conflict, aConcurrentUpdateexception will be raised.ImplementationAVersionFieldis just an integer that increments itself every
time its model is saved.VersionedMixinoverrides_do_update(which is called bysaveto actually do the update) to add an extra
condition to the update query – that the version in the database is
the same as the model’s version. If they match, there have been no
concurrent modifications. If they don’t match, the UPDATE statement will
not update any rows, and we know that someone else saved first.This produces SQL that looks something like:UPDATE mymodel SET version = version + 1, ... WHERE id = %s AND version = %sWhen no rows were updated, we know someone else won and we need to raise
aConcurrentUpdate.Comparison todjango-concurrencydjango-concurrencybefore
version 0.7 usedSELECT FOR UPDATEto implement the version checking. I
wanted to avoid database-level locking, sodjango-optimistic-lockadds a
version filter to the update statement, as described by Martin Fowler[1].Additionally, ool takes a more minimalistic approach than
django-concurrency by only doing one thing – optimistic locking –
without any monkey-patching, middleware, settings variables, admin
classes, or form fields. django-concurrency would probably make more sense
if you’re looking for something that will attempt to accommodate every
situation out of the box. Use ool if you just want a straightforward model
implementation and need to handle the UI and surrounding architecture
yourself.Running the testsmake test[1](1,2)http://martinfowler.com/eaaCatalog/optimisticOfflineLock.html[2]https://code.djangoproject.com/ticket/16649
Package: django-optimized-image
django_optimized_image is a simple Django library that allows optimization
of images by usingTinyPNGorPillow.Quick startAdd “optimized_image” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'optimized_image',
]Optionally, add a setting that lists the file extensions that will be ignored during image optimization (or an empty list to allow all)# ignore GIFs
OPTIMIZED_IMAGE_IGNORE_EXTENSIONS = ['gif']

# either case is fine; this works too
OPTIMIZED_IMAGE_IGNORE_EXTENSIONS = ['GIF']You have the option to use either TinyPNG or Pillow for optimizing images.
Informoptimized_imagewhich one you want to use by setting the following:# To use Pillow
OPTIMIZED_IMAGE_METHOD = 'pillow'
# To use TinyPNG
OPTIMIZED_IMAGE_METHOD = 'tinypng'Any other string that is set for this setting will mean that optimization does
not occur. If you are unsure of whether you would like to use TinyPNG or Pillow,
feel free to consult the documentation of each.If you choose to use TinyPNG, you will need to get an API key from
TinyPNG. Visithttps://tinypng.com/developersfor more details on getting an
API key. Once you have done so, add the following setting to your settings
file. Note: it is a good idea to keep this secret:TINYPNG_KEYMigrate the optimized_image models:python manage.py migrate optimized_imageYou may use theOptimizedImageFieldby importing it:from django.db import models

from optimized_image.fields import OptimizedImageField


class MyModel(models.Model):
    ...
    image = OptimizedImageField()and saving images into it, the same way you would to a DjangoImageField.
The optimized image will be saved into theurlfield in place of the
unoptimized image.If you want to change legacy models with Django’s Image fields and
optimize the images in those fields, you may do so for legacy models
by passing a list of legacy model classes (not their instances) to
the following function:from optimized_image.utils import optimize_legacy_images_in_model_fields
optimize_legacy_images_in_model_fields([LegacyModelClass1, LegacyModelClass2])Note: this function makes calls to TinyPNG and S3, so it can take a really
long time, depending on how many images you have. You may pass in 1
for the verbosity parameter to get logs on the progress:optimize_legacy_images_in_model_fields([LegacyModelClass1, LegacyModelClass2], verbosity=1)Note about TinyPNG API keys: If you obtain the free TinyPNG API token, you are limited to 500
image optimizations per month, so this function may fail if you have a
lot of images. You may either obtain a paid API key, or wait until next month.
Package: django-optin
OptIn is a simple Django app to manage User Preferences. For each
Category, Users can select Yes or No.You set the Categories through the Admin panelDetailed documentation is needs writing.Quick startAdd “optin” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'optin',
]Include the polls URLconf in your project urls.py like this:path('optin/', include('optin.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a Category (you’ll need the Admin app enabled).Add <a href=”{% url ‘optin:user_opt_selection’ user.id %}”>OptIns</a>
to a template to provide a link.  Please note, User must be logged in.Visithttp://127.0.0.1:8000/, Login and click link to set preferences.SettingsOptIn uses AUTH_USER_MODEL as the default user model.  It will default to
the Django User model if AUTH_USER_MODEL is not set in settings.pyOPTIN_SETTINGS_UPDATE_MESSAGE_BOOLEAN:
If True, on successful update of preferences the OPTIN_SETTINGS_UPDATE_MESSAGE
is presented to User (via django messages).
Default = TrueOPTIN_SETTINGS_UPDATE_MESSAGE:
Message displayed to User if OPTIN_SETTINGS_UPDATE_MESSAGE_BOOLEAN set to True.
Default = ‘Preferences Updated’