Saravanan666/pypi-org huggingface dataset:
Package: django-on-heroku
This has been forked fromdjango-herokubecause it was abandoned and then renamed todjango-on-herokubecause old project has been archived.Current updates:renamed package fromdjango-herokutodjango-on-herokuchangedpsycopg2topsycopg2-binaryso it works and is installableadded installation instructionsfixed wipe’ing tables in Postgreswhitenoise.middleware.WhiteNoiseMiddlewareis injected afterdjango.middleware.security.SecurityMiddlewareThis is a Django library for Heroku applications that ensures a seamless deployment and development experience.This library provides:Settings configuration (Static files / WhiteNoise).Logging configuration.Test runner (important forHeroku CI).Django 2.0 is targeted, but older versions of Django should be compatible. Only Python 3 is supported.Installationpip install django-on-herokuUsage of Django-HerokuInsettings.py, at the very bottom:# Configure Django App for Heroku.
import django_on_heroku
django_on_heroku.settings(locals())This will automatically configureDATABASE_URL,ALLOWED_HOSTS, WhiteNoise (for static assets), Logging, and Heroku CI for your application.Bonus points!If you set theSECRET_KEYenvironment variable, it will automatically be used in your Django settings, too!If you set theCONN_MAX_AGEenvironment variable, it will automatically be used in your database settings, too!Enabling Functionalitysettings()accepts keyword arguments that are by default set toFalsegeodjango- set it toTrueif you want to use GeoDjango in our appDisabling Functionalitysettings()also accepts keyword arguments that can be passedFalseas a value, which will disable automatic configuration for their specific areas of responsibility:databasestest_runnerstaticfilesallowed_hostsloggingsecret_keydb_ssl_requiredYou can also just use this library to provide a test runner for your Django application, for use on Heroku CI:import django_on_heroku
TEST_RUNNER = 'django_on_heroku.HerokuDiscoverRunner'
Package: django-onivoro
Allows you to download data from sources and ingest them to your projectDocumentationThe full documentation is athttps://django-onivoro.readthedocs.io.QuickstartInstall Django Onivoro:pip install django-onivoroAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'onivoro.apps.OnivoroConfig',...)Add Django Onivoro’s URL patterns:fromonivoroimporturlsasonivoro_urlsurlpatterns=[...url(r'^',include(onivoro_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-07-06)First release on PyPI.
Package: django-online
Standalone Django application to know if a django user is online or not.CompatibilityThis library is compatible with:python2.6, django1.4python2.6, django1.5python2.6, django1.6python2.7, django1.4python2.7, django1.5python2.7, django1.6python3.3, django1.5python3.3, django1.6
Package: django-online-users
Tracks the time of each user’s last actionUsing middleware, django-online-users will keep track of each user and the timestamp of their last action in the database.Admins can see this data in the admin portal, and the database can be queried using timedeltas.This is meant for smaller applications as each HTTP request will result in a database entry update.RequirementsPython: 2.7, 3.3, 3.4, 3.5, 3.6Django: 1.10+SetupAdd “online_users” to yourINSTALLED_APPSINSTALLED_APPS=[...'online_users',]Add theOnlineNowMiddlewareto yourMIDDLEWARE_CLASSESafter theSessionMiddlewareMIDDLEWARE_CLASSES=(...'online_users.middleware.OnlineNowMiddleware',)Runpython manage.py migrateto create the tables in the database.UseThe time of the last action for each user can be seen in the admin portal athttp://127.0.0.1:8000/admin/online_users/onlineuser/To retrieve the current number of users online in the last 15 minutesfromdatetimeimporttimedelta...user_activity_objects=OnlineUserActivity.get_user_activities()number_of_active_users=user_activity_objects.count()A timedelta can also be specified to theget_user_activities()with to find activityfromdatetimeimporttimedelta...user_activity_objects=OnlineUserActivity.get_user_activities(timedelta(minutes=60)users=(userforuserinuser_activity_objects)APIOnlineUserActivity holds two values:user, the user in question, andlast_activity, a timestamp stored as a DateTimeField.OnlineUserActivity.get_user_activities()will return OnlineUserActivity objects for the last 15 minutes by default.
Developers can also pass in a time delta of a different length of time for the query. The response is a QuerySet containing
the active users during that time period, and the items are sorted in descending chronological order.
Package: django-onmydesk
Django - OnMyDeskA Django app to build reports in a simple way.InstallationWith pip:pip install django-onmydeskAdd ‘onmydesk’ to your INSTALLED_APPS:INSTALLED_APPS = [
    # ...
    'onmydesk',
]Run./manage.py migrateto createOnMyDeskmodels.QuickstartTo create reports we need to follow just two steps:Create a report class in our django app.Add this report class to a config in you project settings to enableOnMyDeskto see your reports.So, let’s do it!Create a module calledreports.pyin you django app with the following content:myapp/reports.py:from onmydesk.core import reports

class UsersReport(reports.SQLReport):
    name = 'Users report'
    query = 'SELECT * FROM auth_user'On your project settings, add the following config:ONMYDESK_REPORT_LIST = [
    'myapp.reports.UsersReport',
]Each new report must be added to this list. Otherwise, it won’t be shown on admin screen.Now, access yourOnMyDeskadmin screen and you’ll see yourUsers reportavailable on report creation screen.After you create a report, it’ll be status settled up as ‘Pending’, to process it you must runprocesscommand. E.g:$ ./manage.py process
Found 1 reports to process
Processing report #29 - 1 of 1
Report #29 processedCollaborationThere are many ways of improving and adding more features, so feel free to collaborate with ideas, issues and/or pull requests.Let us know!We’d be really happy if you sent us links to your projects where you use our component. Just create an issue and let us know if you have any questions or suggestion regarding the library
Package: django-onthefly
# ontheflyChange Django Settings on Custom admin page at "RUNTIME".# Installation```bashpip install django-onthefly```# Configuration##### adminplus configuration (INSTALLED_APPS)Replace 'django.contrib.admin' with 'django.contrib.admin.apps.SimpleAdminConfig'Add 'adminplus' after SimpleAdminConfig```bash'django.contrib.admin.apps.SimpleAdminConfig',# ...'adminplus',# ...```##### onthefly configuration (INSTALLED_APPS)Add 'onthefly' at the bottom of the list.##### Final INSTALLED_APPS```bashINSTALLED_APPS = ('django.contrib.admin.apps.SimpleAdminConfig', (instead of 'django.contrib.admin')# ...'adminplus',# ...# ...'onthefly')```##### You need to change urls.py like below as well```bash# urls.pyfrom django.contrib import adminfrom adminplus.sites import AdminSitePlusadmin.site = AdminSitePlus()admin.autodiscover()urlpatterns = [# ...# Include the admin URL conf as normal.(r'^admin', include(admin.site.urls)),# ...]```# Usagego to django admin panel and see Onthefly Settings on bottom of the page as Custom ViewsAdd, Delete or Change settings at runtime.# TODOs##### 1- Add new backends apart from Redis##### 2- Exception fallback to prevent unstabilities while changing settings at runtime##### 3- More if you 'd like to contribute!# CONTRIBUTE##### All contributions are very welcomed!# SCREENSHOT![ScreenShot](https://raw.github.com/baranbartu/onthefly/master/screenshot.png)
Package: django-oot
InstallationTo install this application:Put it in a directoryootinside your project.Include'oot'insettings.INSTALLED_APPS.UsageFor rendering an instance of a model into an OpenOffice.org Writer document:Create an instance of theWriterTemplatemodel, either manually in the
shell, using fixtures or through the admin. Choose the right content type
for the objects you want to render.Use the{% writer_templates obj %}templatetagwherever you wish to
include a link for rendering an object into a Writer document.
Package: django-openacct
OpenAcct is a pluggable Django app for managing research computing center project accounting.It is intended to provide a flexible, scheduler-agnostic alternative to other Allocation and Account Management Database
tools like Gold, Moab Account Manager, and the SlurmDBD. OpenAcct allows for definition of multiple Services per System,
each with their own units of resource consumption and charge rates. Charging is managed through Transactions, which bind
an amount of a Service’s resources consumed with an Account responsible for any charges incurred by that consumption.
Transaction objects can be individually tracked, selectively charged, and refunded when needed to maintain an event-based
history of account activity.Installationdjango-openacctcan be installed from PyPI, and requires no external dependencies aside from Django.?> pip install django-openacctQuick StartThe following shows a small setup script being piped into the Django shell interpreter:?> cat openacct_example.py

from openacct.models    import *
from openacct.shortcuts import *

# Create a System and Service for a cluster
cluster = System.objects.create(name='cluster', description='A Cluster')
service = Service.objects.create(
    name='cluster-core-hours', units='core-hours', system=cluster,
    charge_rate=0.05, description='CPU core usage * wallclock hours'
)

# Create Users
bob = User.objects.create(name='bob')
sue = User.objects.create(name='sue')
tux = User.objects.create(name='tux')

# Create Projects and grant access to the cluster's service
phys = create_project('phys', pi=bob, description='Physics Dept')
chem = create_project('chem', pi=sue, description='Chemsitry Dept')
grant_service_access(service, project=phys)
grant_service_access(service, project=chem)

# Add a user to the projects
add_user_to_project(tux, chem)
add_user_to_project('tux', 'phys')


?> ./manage.py shell < openacct_example.pyThis example shows a basic setup for a center, with a single compute resource
which is charged on a per core-hour basis. Several users and two projects, one
for a Physics Department, and another for a Chemistry Department, are created.Access to use a service is managed through Accounts, which are being implicitly
created for each project. When passing theprojectparameter togrant_service_access, all active accounts are granted the same access.
Accounts can be created explicitly and granted access individually when desired.Finally, the usertuxis added to both of the created projects,
demonstrating how the shortcut functions will accept both the name of an object
or the object itself for all parameters referencing one of the models in the
schema.With this setup in place, job records could be added to the database as Job
objects, with Transactions making use of thecluster-core-hourservice
linked to them.
Package: django-open-ai
This app enables you to use OpenAI requests over the Django database.InstallationYou can install the package using pip:#pip install django-open-aiQuick startPlease include your OpenAI API key in the settings.py file as follows. Please also include your target database (generally “default” but could be different if you have more databases)::OPENAI_API_TYPE = "standard"
OPENAI_API_KEY = "<YOUR_API_KEY>"
OPENAI_TARGET_DATABASE = "default"Also make sure that the package is in the installed apps list in the settings.py file::INSTALLED_APPS = [
'django_open_ai',
...
]Now, make sure that your database is not sqlite3, as this is not supported. Similarly, the each database in the DATABASES list in the settings.py file must include the following keys: HOST, NAME, USER, PASSWORD, ENGINE, PORT. The current version only allows for when the host is the server.Simple exampleSuppose that the Django app has an app called polls.py (as per the examplehttps://docs.djangoproject.com/en/4.2/intro/tutorial01/). Then in the polls/views.py simply make:from django_open_ai import views

class make_view(views.DjangoOpenAI):
    template = "YOUR OWN TEMPLATE.html"Please make sure that your template includes a form as follows:<form method="post">
    {% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Submit">
</form>Now set up your urls.py file inside polls:from django.urls import path
from . import views

urlpatterns = [
    path('', views.make_view.as_view()),
    ...
]and in your site urls.py:from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path("ai/", include("polls.urls")),
    ...
]That’s it! Run your server:python manage.py runserverThe pagehttp://127.0.0.1:8000/ai/shows the form. Ask away about your data! For example “What is the most popular choice for question 1?”. This will return a JsonResponse with the result.
Package: django-openai-assistant
A Django / Celery scalable OpenAI Assistant Runner.Assumption: you have Django up and running with Celery.
(Tested on Redis)pip install django_openai_assistantin settings.py
Add 'django_openai_assistant' to your INSTALLED_APPS [] arraymake sure to have OPENAI_API_KEY defined in settings with your OpenAI keycreate and apply migrations for django_openai_assistantCreate a simple Assistant inhttps://platform.openai.com/assistantsTo begin you probably want one with no functions.
Let's say you called it 'Test Assistant'Use the assistant in your code:demo.pyffrom django_openai_assistant.assistant import assistantTask
from celery import shared_task

 # Define OPENAI_API_KEY in your settings.py file
 # Add 'django_openai_assistant' to your INSTALLED_APPS in settings.py
 # run python manage.py makemigrations django_openai_assistant and then python managey.pymigrate
 # create at least one Assistant in https://platform.openai.com/assistants

def testAssistant(request=None):
    # replace <<your appname>> with the name you django app this file is in!
    # replace <<your assistant name>> with the name of the assistant you created in the OpenAI platform
    task = assistantTask(assistantName="<<your assistant name>>", tools= [], completionCall = "<<your appname>>.test:afterRunFunction")
    task.prompt = "Who was Napoleon Bonaparte?"
    task.createRun() ## this will get everything going!

@shared_task(Name="This will be called once the run is complete")
def afterRunFunction(taskID):
    # Function is called when run is completed. MUST be annoted as @shared_task!!! 
    # start by retrieving the task
    task = assistantTask(run_id = taskID)
    if task.status == 'completed': ## check to make sure it is completed not failed or something else
        print(task.markdownresponse())
    else:
        print('run failed')Seehttps://medium.com/@jlvalorvc/building-a-scalable-openai-assistant-processor-in-django-with-celery-a61a1af722e0Version history:0.4.1another fix for metadata always returning {} never None0.4.0redo readme.mdstandard version numberingtask.metadata is now initiatilized as {} to prevent task.metadata.get() from failing.0.33retrieve by thread_id or run_id openaiTask(run_id='run_xxxx').asmarkdown(string) available as a function outside classretrievefile() to download a file by openai file ID.now processing multi response with embedded image.0.32small fixes.0.31made sure that file uploads to openai receive a 'file name' when uploaded.0.30fix to properly differentiate between two functions that start with the same name like 'company'and 'companyfind' and throw and exception (istead of a pass) when running in Debug mode when calling tool function.
Package: django-openauth
Openauth 是 统一认证平台的 django 插件。通过这个插件，django 可以与 统一认证平台 集成起来，直接具备如 企业微信 登录能力。原理上，就是直接改写 django admin 的 login 页，使其接受 jwt 参数，判断 jwt 合法性，从中解析用户账号。
如果账号存在，则直接登录，如果不存在，则创建后再置为登录态。其中统一认证平台可以自己搭建。Quick start安装pip install django-openauth在 settings 加入 uniauthINSTALLED_APPS = [
    ...
    'openauth',
]在 urls.py 加入 openauthpath('openauth/', include('openauth.urls')),同步数据库python manage.py migrate访问http://localhost:8000/admin看效果配置项settings 支持以下配置项:OPENAUTH_JWT_SECRET：如果该配置项有值，或值不为空字符串，则 jwt 的认证 secret 从该项获取。
这时不需要 redis。若该配置项为空，则 openauth 会从 Redis 中的 jwt_secret 中获取 secret如果 jwt secret 从 redis 中获取，请在 settings 的 cache 中这么配置:CACHES = {
   'default': {
       ...
   },
   'openauth': {
       "BACKEND": "django_redis.cache.RedisCache",
       "LOCATION": f"redis://{config.openauth_redis_host}:{config.openauth_redis_port}/{config.openauth_redis_db}",
       'KEY_PREFIX': '',
       "OPTIONS": {
           "CLIENT_CLASS": "django_redis.client.DefaultClient",
           "PASSWORD": f"{config.openauth_redis_password}"
       }
   }
}
Package: django-openbudget
[GNUCash]:http://www.gnucash.org#Open BudgetSimple django-based personal budgeting app that uses [GNUCash][] sqlite data files.#Motivation
This project serves two main purposes:get data out of gnucash and into the django framework to allow for more flexible analysis eg: using the numpy maths libraryimplement basic budget functionality to allow a flexible budgeted vs actual reportGNUCash works as a good tool for data entry and standard accounting reports like balance sheets and profit & loss. However, report customisation is overly complicated and the budget functionality poor.  This project aims to address these issues.#Statusbasic structure implemented - a gnucash file can be used to import accounts, transactions and splits#Installation$  git clone git://github.com/evandavey/OpenBudget.git openbudget
$  cd openbudget
$  pip install -r requirements/development.txtIf fabric is installed:$  fab development syncdb
$  fab development migratedbOtherwise:$  ./manage.py syncdb –settings=openbudget.settings_local
$  ./manage.py schemamigration openbudgetapp –settings=openbudget.settings_local#Usage##Running the serverIf fabric is installed:$  fab development runserverOtherwise:$  ./manage.py runserver 0.0.0.0:8080 –settings=openbudget.settings_localAccess the admin interface at:http://127.0.0.0.1:8080/admin/##Importing a gnucash fileSave your GNUCash file as a sqlite3 file.$ ./manage.py gnucash-import <gnucash sql file> –settings=openbudget.settings_local##Creating budgetsAccess the admin interface at:http://127.0.0.0.1:8080/admin/and create or edit AccountBudget objects.Budgets are specified as a total value over a given period.Total amounts will be spread daily over a given analysis period for reporting eg: a yearly budget value will be converted to 365 daily values which will then be multiplied by the number of days in a given month for a monthly report##The Budget ReportAccess athttp://127.0.0.0.1:8080/openbudget/budget/<startdate>/<enddate>/<depth>/<freq><startdate> and <enddate> specify the analysis period and should be in YYYYMMDD formatDepth specifies the depth of the account tree to report on.Freq will define the analysis grouping.  Use ‘m’ or monthly groups, ‘q’ for quarterly groups and ‘y’ for annual groupsFor best results, the report should be produced over 6 periods eg: 6 years or 6 quarters or 6 months# Dependenciespip:$  easy_install pipTo use the fabfile and fab commands:$  pip install fabric
Package: django-openid-auth
A library that can be used to add OpenID support to Django applications.
The library integrates with Django’s built in authentication system, so
most applications require minimal changes to support OpenID llogin. The
library also includes the following features:Basic user details are transferred from the OpenID server via the
Simple Registration extension or Attribute Exchange extension.can be configured to use a fixed OpenID server URL, for use in SSO.supports the launchpad.net teams extension to get team membership
info.
Package: django-openid-op
# django-openid-opThis django application provides an implementation of OpenID Connect identity server
(OpenID provider). You can use it, for example, for building centralized authorization
server to which clients connect via the OpenID or OAuth2.0 protocol.This library is compatible with python-social-auth package that can be used
as an OpenID client to access this server.The following features of the OpenID Connect specification are implemented:Basic profile from the OpenID Connect Core, including JWT signingSubset of OpenID Connect Dynamic RegistrationSubset of OpenID Content DiscoveryFor more details seehttps://github.com/mesemus/django-openid-op
Package: django_openid_provider
Django OpenID Provider application acts as OpenID provider (in lame terms
Server) for yourdjango.contrib.authaccounts.See docs/ directory for documentation or browse it online at:http://django-openid-provider.readthedocs.org/Check for new releases and report bugs at:http://bitbucket.org/romke/django_openid_provider/Copyright (C) 2010 Roman BarczyńskiLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: django-openid-whitelist
django-openid-whitelist offers an easy way to keep your projects private.After installation add your OpenID to the whitelist. With this
OpenID it is possible to add another OpenID. If not disabled,
each whitelisted OpenID can be used to whitelist more IDs.For example - if there is OpenID A, with A it is possible to add
OpenID B. Then with B it is possible to add another OpenID and so on.It’s pretty intuitive to use this application.Requirementsdjango >= 1.0python-openidInstallationinstall (for example easy_install django-openid-whitelist)install python-openidadd ‘whitelist’ to your INSTALLED_APPSrun syncdbinclude whitelist.urls (for example -  url(r’^whitelist/’, include(‘whitelist.urls’))form then accessible at whitelist/startSimple form stylewhitelist_style.cssincluded in whitelist/media installation directory.UsageTo verify OpenID usewhitelist-checkandwhitelist-check-jsonviews.
To add OpenID usewhitelist-start.
(names inquotesare named urls - simply use {% url whitelist-start %} in
your template)Also check view documentation in django admin.Optional settingsOPENID_TRUST_ROOTTrust root for the OpenID Request.
Defaults to the base URL of your page.OPENID_DISALLOW_INAMESDisallow personal i-names. Defaults to falseCompatible withTracAuthOpenidAddcheck_listandcheck_list_keyto your[openid]section in
trac.ini.check_listhas to point towhitelist-check-jsonview.
Setcheck_list_keyto whatever you like (openidfor example).
Package: django-opening-hours-management
Manage opening hours with ease!InstallAdd this in yourINSTALLED_APPS:"nested_admin","opening_hours_management",UseImport module in your models.py:fromopening_hours_management.modelsimportOpeningHoursAdd your opening attribute in your model:opening=models.OneToOneField(OpeningHours,verbose_name=_("Opening hours"),on_delete=models.SET_NULL,null=True,)Runmakemigrationsandmigrate.Add this on your template file:{% load opening_hours_management %}

{% show_opening_hours object.opening <True/False> %}Hereobject.openingis ourOpeningHoursOneToOne, andTrue/Falseis a condition that makes the templatetag displays special openings/closings that have already occurred. It defaults toFalseif not present (example).Screenshot
Package: django-openonmobile
Open current page on your mobile with a QR code.Main url:http://bitbucket.org/ferranp/django-openonmobileDocumentation :http://readthedocs.org/docs/django-openonmobileFeaturesCreates a QR image with a url to redirect a phone user to the current image.The mobile phone user will be authenticats automatically with the same user.Uses the cache to keep the temporaty toker for authentication (so no database needed).InstallationAdd"openonmobile"directory to your Python path.Add"openonmobile"to theINSTALLED_APPStuple found in
your settings file.Add"openonmobile.middleware.AuthOnMobileMiddleware"to yourMIDDLEWARE_CLASSEStuple found in your settings file.Add"openonmobile.auth.AuthOnMobileBackend"to yourAUTHENTICATION_BACKENDStuple found in your settings file.Include"openonmobile.urls"to your URLconf.