Saravanan666/pypi-org huggingface dataset:
Package: django-rlog
Save rlog’s Pub/Sub Log to DiskInstallationpip install django-rlogUsageStart rlog:python manage.py rlog [channel] [filename] [handler] [when] [maxBytes] [backupCount] [debug]Start rlistlog:python manage.py rlistlog [key] [timeout] [filename] [handler] [when] [maxBytes] [backupCount] [debug]Stop rlog:python manage.py rstop [channel]Stop rlistlog:python manage.py rliststop [key]Redis Connectiondef get_connection():
    for key in ['REDIS_CONN', 'REDIS_CLIENT', 'REDIS_CACHE']:
        if hasattr(settings, key):
            return getattr(settings, key)GetRedis Connectionfrom settingsRedis Connectionin settings refer to [Django Cook Book](https://github.com/xxx-cook-book/django-cook-book/tree/master/Caches/Redis)
Package: django-rmixins
What is it?django-rmixins is a simple Django App that contains some Mixins to use for
Django’s Class Based Views.InstallationYou can do any of the following to installdjango-rmixinsRunpip installdjango-rmixins.Runeasy_installdjango-rmixins.Download or “hg clone” the package and runsetup.py.Download or “hg clone” the package and addrmixinsto your PYTHONPATH.UsageFor example if you’d like to use theCacheMixin:from django.views.generic import ListView

from rmixins.mixins import CacheMixin

class PostsListView(CacheMixin, ListView):
    cache_timeout = 900
    model = Posts
Package: django-roadies
Django RoadiesSuite of django specific utilities/helpers.OverviewYet another django toolset to help with a range of django stuff... e.g. tests for abstract models, on_commit hooks, etc.
The genesis of this project is aimed towards supporting django by making available common project-agnostic tools.Installationpip install django-roadiesUsageTDBDevelopmentEnsure docker is installed. Instructions on installing docker can be foundhere.
Once docker is installed build the docker image by running the following script:./bin/local/buildthen, running tests is as simple as:./bin/local/test
Package: django-roadmap
A reusable Django app to store and display a set of goals for the future.InstallationPrerequisites:Djangodjango-cms (cms 3 tested)django-hvadIf you want to install the latest stable release from PyPi:$ pip install django-roadmapIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitmazk/django-roadmap.git#egg=roadmapAddroadmapto yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'roadmap',
)Run the South migrations:./manage.py migrate roadmapUsageTODO: Describe usageRoadmapCheck the issue tracker on github for milestones and features to come.
Package: django-roberts
A simple Django app to serve a robots.txt file.RequirementsDjango 1.2 or greater, Python 2.7 or greater.InstallationUse your favorite Python installer to install it from PyPI:pip install django-robertsOr get the source from the application site:hg clone https://bitbucket.org/mhurt/django-robertsTherobotspackage, included in the distribution, should be placed on thePYTHONPATH.ConfigurationAddrobotsto yourINSTALLED_APPSsetting.Include the package’s url patterns in your rooturls.py:url(r'', include('robots.urls')),If your run Django’s development server you should now be able to see the example robots.txt file athttp://127.0.0.1:8000/robots.txtExtrasFor convenience the package defines the usable combinations of robots directives which can be used in your views and templates.The following constants are defined:NOINDEX_FOLLOWINDEX_NOFOLLOWNOINDEX_NOFOLLOWHere’s a simple example of using these constants in practice…In your view:# views.py
import robots

class MyView(ListView):
    meta_robots = robots.NOINDEX_FOLLOW
    ...
    ...In your base template:# base.html
<html>
  <head>
  ...
  {% include 'robots/meta_robots.html' %}

  <!-- OR -->

  {% if view.meta_robots %}
    <meta name="robots" content="{{ view.meta_robots }}">
  {% endif %}
  ...
  ...Python packageThe Python package is available fromPyPIGet the source codeFrom ourBitBucket repository.Report a bugPlease report any bugs through ourIssue Tracker.
Package: django-robohash-svg
Django app for creating svg robotsThe idea: from any string (username, first name and last name, etc…), obtain a unique svg robot to display. This is useful for creating avatars or for testing purposes.InstallationInstall with pip:pip install django-robohash-svgThen declare the app in your settings.pyINSTALLED_APPS = [
...
    'django_robohash',
]UsageIf you want an inline image in your template use the robohash tag{% load robohash %}
...
here is a robot:
{% robohash "a string" %}
a small one :
{% robohash "a string" width=100 height=100 %}If you want to serve robot images, edit your urls.py and use robohash viewfrom django_robohash.views import robohash

urlpatterns = [
    ...
    path('robohash/<string>/', robohash,
         name='robohash')
]You can custom the url if you want, but keep “<string>”.Then you can display image like this<img src="/robohash/{{ a_string }}/">

or

<img src="/robohash/{{ a_string }}/?width=120&height=120">Default robots size is 300x300You can generate the svg code by running this function:from django_robohash.robotmaker import make_robot_svg
...
svg_code = make_robot_svg("my string", width=300, height=300)News0.9.4 (2018-08-13)Add documentation0.0.1 (2018-03-22)Skeleton commit
Package: django-robokassa-merchant
AboutTODORequirementsPython 2 & 3Django 1.8+InstallationInstall it using pip (coming soon):pipinstalldjango-robokassa-merchantAdd therobokassa_merchantapp to yourINSTALLED_APPS:# settings.pyINSTALLED_APPS=(...,'robokassa_merchant',...)TODOUsageTODOLicenseThis software is distributed under the MIT License - please, seeLICENSEfile
Package: django-robots
This is a basic Django application to manage robots.txt files following therobots exclusion protocol, complementing theDjangoSitemap contrib app.For installation instructions, see the documentationinstall section;
for instructions on how to use this application, and on
what it provides, see the file “overview.txt” in the “docs/”
directory or on ReadTheDocs:https://django-robots.readthedocs.io/Supported Django versionsDjango 4.0Django 3.2Django 3.1Django 2.2For older Django versions (1.6-1.10) usedjango-robots==3.0.
for Django 2 and above, usedjango-robots>=4.0.0.Supported Python versionPython 3.7, 3.8, 3.9, 3.10
Package: django-robots-txt
This is a simple application to create arobots.txtfile for django. It has no models at all and you’re supposed to edit a template to update therobots.txtfile. I got tired of having to add this view to each and every project because Django doesn’t have a built intext/plainview.See therobots pagefor details what the file should look like.UsageGetdjango-robots-txtinto your python path:pip install django-robots-txtCreate your custom robots.txt file in one of your template directories asrobots_txt/robots.txt.Add arobots.txtview to your rooturls.py:from django.conf.urls.defaults import patterns, include, url
from robots_txt.views import RobotsTextView

urlpatterns = patterns('',
    ...,
    url(r'^robots.txt$', RobotsTextView.as_view()),
    ...,
)That’s it, your robots.txt template will be served.This urlconf entry is also supported if you prefer to keep it short:urlpatterns = patterns('',
    ...,
    url(r'', include('robots_txt.urls')),
    ...,
)You can addrobots_txtto your INSTALLED_APPS in settings.py if you don’t want to create your own template and don’t mind having an emptyrobots.txt:INSTALLED_APPS = (
    ...,
    'robots_txt',
    ...,
)Changes0.4:
- Refactor tests
- Updates for Django 1.60.3:
- Bugfix for included urlconfig
Package: django-robust-i18n-urls
# django-robust-i18n-urlsThis application solves a few problems related with using internaitonalizedurls inside Django. If you want a full rationale please check out:http://blog.karolmajta.com/robust-internationalized-urls-for-django.htmlfor an article explaining issues that arise when dealing with defaultDjango setup for internationalized urls.## UsageTo use the app:pip install django-robust-i18n-urlsIn your `urls.py`, add to your `urlpatterns`:url(r'^i18n/', include('robust_urls.urls')),In your `settings.py`:MIDDLEWARE_CLASSES = (# ...'robust_urls.middleware.RobustI18nLocaleMiddleware',# ...)This should get you going with the default setup. Django's documentationon translation and selecting language can help you.For full documentation please seehttp://django-robust-i18n-urls.readthedocs.org/## DevelopmentClone this repo, then:pip install -e .pip install -r requirements.txtpython setup.py test## TODO/RoadmapCurrently I don't need any more features beyond what is already provided,but if you have ones that suit your use cases, feel free to issue a pullrequest. Any additional tests are welcome too.
Package: django-rocket
Create your landing page with all the common features: A release date counter,
email subscribers, social integration, segmentation, etc.FeaturesBased on bootstrap3.Integrate it easily with your existing project.Customize your landing page using your own templates.Email newsletters, collect subscriber and send them newsletter from the django administration interface.Not online yet? Easy render a countdown.Integrate with as aDjango-CMSplugins.Easy to use templates to enable Social Integration.Segmentate your landing page by using tags.Easy to extend form from settings.Not enough for you? All views are Class Based Views and can be used in your project with out registering the default urls.How to InstallGet the codeGetting the code for the latest stable release usepip.$ pip install django-rocketInstall in your projectThen registerdjango_rocket, in theINSTALLED_APPSsection of
your project’s settings.INSTALLED_APPS = (
  'django.contrib.auth',
  'django.contrib.admin',
  'django.contrib.sites',
  'django.contrib.comments',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.contenttypes',

  'django_rocket',
)Add at these following lines to your project’s urlpatterns in the last position
to enable the landing page.url(r'^', include('django_rocket.urls')),Remember to enable thedjango.contrib.adminsite in the urls.py of
your project if you haven’t done it yet for having the edition capabilities.Syncing the databaseNow that you have everything set up, simply run the following in your
project directory to sync the models with the database.$ python manage.py syncdbIf you are using South to manage your database, you will have to do the
following.$ python manage.py syncdb --migrateFor more detailed documentation go tohttp://django-rocket.readthedocs.org/
Package: django-rocketchat-auth
Authenticate yourRocket.Chatusers with Django web framework.This app implements the API used byRocket.Chat IFrame authentication. Also, it handles logout by wiring up a method on Django signals.QuickstartInstall this app in you project:pip install django-rocketchat-authAdd “rocketchat_auth” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'rocketchat_auth',
)Update yoursettings.py:MONGO_DB = 'localhost:27017'
ROCKETCHAT = 'localhost'Include the rocketchat_auth URLconf in your project urls.py like this:urlpatterns += [url(r'^rocketchat/', include('rocketchat_auth.urls'))]You will probably need to usedjango-cors-headersand set your Rocket.Chat domain inCORS_ORIGIN_WHITELISTNow go to your Rocket.Chat admin page > Settings > Accounts. EnableIframeand set:Iframe URL:http://localhost:8000/login/?next=/rocketchat/redirect(assuming you have a login page in /login)URL API:http://localhost:8000/rocketchat/apiRoadmapEnforce unique email registration in Django admin, since Rocket.Chat requires this.Update Rocket.Chat user details in MongoDB when the user is modified in Django Admin.
Package: django-rocket-engine
Motivation  to create  this project  was  the fact  of publication  by
Google CloudSQL backend.  This library as  it is is not for production
ready yet,  the same as  Google AppEngine  CloudSQL is not  ready for
production as well being currently in development preview.Project originaly inspired by work  of Waldemar Kornewald and Thomas Wanschik
fromAll  Buttons  Pressed,  some ideas  where  moved  fromdjangoappengineproject.Documentation:http://readthedocs.org/docs/django-rocket-engine/Source Code:https://github.com/xando/django-rocket-engineExample application:https://github.com/xando/rocket-project
Package: django-roi-buro-sample-project
ROI BURO sample projectNameROI BURO sample test projectDescriptionThis is Django-based sample test project which collect information about CPU usage and shows this stats at HTML page.
There are client - linux daemon written on Python, which measures CPU utilization periodically and server - django application, which receives measures via REST API.InstallationAdd "roiburo" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
...
'roiburo',
]Include the sample project URLconf in your project urls.py like this:path('roiburo/', include('roiburo.urls')),Runpython manage.py makemigrations roiburoto create project migrations.Runpython manage.py migrateto create models.Start the development serverpython manage.py runserver.Edit daemon api_url setting in client/config.ini, set it tohttp://127.0.0.1:8000/roiburo/api/v1/core/system-states.Start daemon fromclientfolder by runningpython main.py.Visithttp://127.0.0.1:8000/roiburo/api/v1/core/system-state-detailsto view statistics.API docs is available athttp://127.0.0.1:8000/roiburo/api/schema/swagger-ui#/FeaturesDjango 3.2Python 3.912-Factorbased settings viadjango-environOptimized settingsOpenAPI based docs viadrf-spectacular
Package: django-rok
=====Django-Rok=====Django-rok is an ssh tunnel tool that provide a public url for your local web server and help in testing webhook integrations.The django-rok is inspired from <a href="https://ngrok.com/" traget="_blank">ngrock</a> and built using <a href="http://www.paramiko.org/" targat="_blank">paramiko</a>.# InstallationInstall using `pip`...pip install django-rok# Quick Start1. Add <b>"django_rok"</b> to your INSTALLED_APPS setting like this::```pythonINSTALLED_APPS = [...'django_rok',]```2. Add the following parameters to the settings.py::```pythonROK_REMOTE_HOST="192.168.1.1" # remote host ipROK_REMOTE_PORT=9000 # remote host port to connect toROK_USERNAME="root" # remote host usernameROK_PASSWORD="root" # remote host password```3. Instead of django runsver run this command::```pythonpython manage.py runrok```This will run the rokserver as well as the django development server.4. Now go to the url ```http://192.168.1.1:9000``` to access your local development server publicaly.# Additional Configuration1. Private key can be used to connect to the remote server. To do so add the following parameter to settings.py```pythonROK_KEY="/path/to/private/key" # private key for remote host connectionROK_PASSWORD=None # remote host password is not required since we are using private key```2. Rokserver can be started standalone without invoking the django development server. Thing can be achieved by setting env variable```pythonROK_ENV="PRODUCTION"```3. Local port for rokserver can be changed by passing the ```-lp``` parameter```python manage.py runrok -lp 8080```# Command Line UsageYou can also pass the parameters through command line.<b>Example:</b>```python manage.py runrok -r 192.168.1.1 -rp 9000 -u 'root' -p 'root'```To check the command line parameters run ```python manage.py runrok --help``````usage: manage.py runrok [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS][--pythonpath PYTHONPATH] [--traceback] [--no-color][-lp LOCAL_PORT] [-rp REMOTE_PORT] [-r REMOTE_HOST][-u USER_NAME] [-p PASSWORD] [-key PKEY] [-env ENV]Command to run runrok server along with django development serveroptional arguments:-h, --help            show this help message and exit--version             show program's version number and exit-v {0,1,2,3}, --verbosity {0,1,2,3}Verbosity level; 0=minimal output, 1=normal output,2=verbose output, 3=very verbose output--settings SETTINGS   The Python path to a settings module, e.g."myproject.settings.main". If this isn't provided, theDJANGO_SETTINGS_MODULE environment variable will beused.--pythonpath PYTHONPATHA directory to add to the Python path, e.g."/home/djangoprojects/myproject".--traceback           Raise on CommandError exceptions--no-color            Don't colorize the command output.-lp LOCAL_PORT        The local port to forward the request.-rp REMOTE_PORT       The remote port for ssh connection.-r REMOTE_HOST        The remote host for ssh connection-u USER_NAME          The username for remote host-p PASSWORD           The password for remote host(If there)-key PKEY             The private key for remote host(If there)-env ENV              Which env the server is running on```
Package: djangoroku
DjangorokuDjangoroku is the package that helps to deploy Django application on Heroku.HowConfigures thesettings.pyfile for deploymentInstalls all the necessary packages in your projectDeploys the application while codingConfigures the default database,sqliteon HerokuTechDjangoroku involves these tech:Django- Python backend frameworkHeroku- PaaS for build and deploy appsPython- Server side languageInstallation and UsesTo install and usedjangorokurun these commands. Make sure you're at the root directory of your project.$pipinstalldjangoroku
$echo"from djangoroku import *">deploy.py
$python3deploy.pyThe script will start running and do everything for you. You'll only needed to provide:Your project nameChoose the app name (which will be the Heroku domain name)Needed to be logged in your Heroku account (emphasized)Make sure your project runs with no errors onlocalhost, while developing. Note that, the package only helps you to deploy and not debug your coding errors.TodosDisplay and interprete Heroku logs for debugging during deployment.Setting up all types of databases.LicenseMIT
Package: django-role
django-roleПакет включает в себя:Модель пользователя срольювместогруппВиджет для выбора правРоль в отличии от групп связана с моделю пользователя связьюОдин ко многимУстановкаpip install django-rolepoetry add django-roleИспользование модели пользователяmodels.pyfromuser_role.modelsimportAbstractUserclassUser(AbstractUser):...settings.pyAUTH_USER_MODEL="app_name.User"Использование виджета для выбора правsettings.pyPERMISSIONS_LABELS={"add":"Добавление","change":"Изменение","view":"Просмотр","delete":"Удаление",}forms.pyfromdjangoimportformsfromdjango.contrib.auth.modelsimportPermissionfromdjango.utils.translationimportgettext_lazyas_fromuser_role.modelsimportRolefromuser_role.widgetsimportPermissionsSelectMultiplyclassRoleCreationForm(forms.ModelForm):permissions=forms.ModelMultipleChoiceField(label=_("Permissions"),widget=PermissionsSelectMultiply(),queryset=Permission.objects.all())classMeta:model=Rolefields=["name","permissions"]Группирование прав и настройка виджетаclassMyPermissionsSelectMultiply(PermissionsSelectMultiply):groups_permissions={"Безопасность":["user_role.user","user_role.role"]}
Package: django-role-router
django-role-router is a simply, definition designed router with multi-roles.You can install it with pip. >pip install django-role-routerTo use it, make sure you have installed django-role-router already.Insert middleware jhvar.django.urls.middleware.JvRoleMiddleware after SessionMiddleware.You can define app role permission like “permitted_roles = [‘admin’]” in urls.py global section.You can define path role permission like “jv_path(‘admin’, views.my_admin, name=’my_admin’, roles=[‘admin’])” in urlpatterns list. Path role has more priority than app role.We have supported regex format with “jv_re_path” function, just like “jv_path”. It can also work with rest_framework router.You can define logger ‘jhvar.django.logger’ in urls.py logger section, to print debug info.Now, you have role permission verifier, you should add your role granty in somewhere.It just like “grant_roles(request, ‘admin’)” or “grant_roles(request, (‘admin’, ‘super’))” or  “grant_roles(request, [‘admin’, ‘super’])”.Join it, have fun!Visithttps://github.com/jhvar/django-utilsfor more detail.
Package: django_roles
Django Roles===================## InstallationInstall the package```bash$ pip install django-roles```## Dependenciesdjangodjango-mptt##TestingRun all tests:```bash$ python -m unittest discover -s tests -p '*_test.py'```Start test with nose and code coverage:```bash$ nosetests --with-cov  --cov-report html  --cov  django-auth tests/```
Package: django-roma
django-romais a read-onlyModelAdmin.Django’s admin interface is designed for editing, not viewing. But sometimes
you want read-only models, and the admin is a convenient place to put them.Installation:pip install django-romaUsage:Edit the relevantadmin.pyin your project. e.g:from roma import ReadOnlyModelAdmin
from myproject.myapp.models import MyModel

admin.site.register(MyModel, ReadOnlyModelAdmin)Or if you want a bit more customisation:from roma import ReadOnlyModelAdmin
from myproject.myapp.models import MyModel

class MyModelAdmin(ReadOnlyModelAdmin):
    fields = ("title",)

admin.site.register(MyModel, MyModelAdmin)
Package: django-roman
Django Romanis aDjangotemplate tagapplication to convertArabic numeralsintoRoman numerals.Original Roman numeral conversion codeadaptedfromDive Into Python 3by Mark Pilgrim.PackageSourceDocumentationTestsInstall$pipinstalldjango-romanAdd tosettings.py.INSTALLED_APPS=[# ...'roman',]UsageConvert Arabic numerals to Roman numerals with theromantemplate filter.{%loadroman_tags%}{{"Party like it's 1999."|roman}}Result:Party like it's<spanclass="numerals numerals-roman">MCMXCIX</span>.Can also be imported as a standalone Python module:>>>fromromanimportroman>>>roman(1999)'MCMXCIX'>>>roman("1999")'MCMXCIX'>>>fromromanimportarabic>>>arabic("MCMXCIX")1999
Package: django_ror_url
Ruby on Rails Syntax for Django==============================Usage-----::from ror_url import ror_urlurlpatterns = [ror_url('blog/', index_view, name="index"),ror_url('blog/:slug', article_view, name="article",constraints={"slug": "[-\w]+"})]About-----django_ror_url try to replicate the Ruby on Rail routing syntax foruse with django routing system.It is currently in alpha state with most but the essential partmissing.How is it working ?-------------------Currently, the ror_url module only provide a single function, ror_urlintended to replace the native django's django.conf.urls.url. There aretwo differences between these functions. The ror_url take a segmentbased path instead of a regex as its first argument and it also take anextra argument, constraints.In the segment based path, the url is split on slash and each resultingpiece is considered a segment. A segment can either be a fixed piece,like ``blog`` or can be an argument, like ``:slug``.By default, each argument match any string. That can be changed withthe use of the constraints argument. It is a dict, with argument as keyand regex or flag as values. If a flag is used, it will be replaced bya corresponding regex.The currents flags and their corresponding regex are:==== =====flag regex==== =====str  .+int  \d+==== ====
Package: django-rosetta
Rosetta is aDjangoapplication that facilitates the translation process of your Django projects.Because it doesn’t export any models, Rosetta doesn’t create any tables in your project’s database. Rosetta can be installed and uninstalled by simply adding and removing a single entry in your project’sINSTALLED_APPSand a single line in your mainurls.pyfile.Note:As of version 0.9.0, django-rosetta requires Django 1.11 or laterAs of version 0.9.6, django-rosetta requires Django 2.2 or laterAs of version 0.9.9 django-rosetta supports Django 3.2 or laterAs of version 0.10.0, django-rosetta requires Django 4.2 or laterFeaturesReads and writes your project’sgettextcatalogs (po and mo files)Installed and uninstalled in under a minuteUses Django’s admin interface CSSDocumentationPlease refer to theonline documentationto install Rosetta and get started.