Saravanan666/pypi-org huggingface dataset:
Package: django-server-config-generator
Django Server Config GeneratorDjango server config generator is a simple django extension which generates apache config by running a management command, It automatically detects document root, static root/url, media root/url, and also the path to the current running virtual environment.Installation$pipinstalldjango-server-config-generatorRequirementsPython3.6+Apache2.4UsageAdd server_config_generator to the installed app in the settings file,INSTALLED_APPS=(# other apps"server_config_generator",)Runpython manage.py generate_apache_config,$pythonmanage.pygenerate_apache_configUser will be prompted to enter the type of virtual hosting,PleaseenternamebasedorIPbasedhosting(name/ip):?Enter a valid option and press 'Enter' keyThen the user will be prompted to enter the server name or the ip address based on the previous input,Entertheservername:OREnteryourIP:Enter a valid server name or ip addressThen the user will be prompted to enter port number, default value for which will be 80,Entertheport(default:80):Enter the required port number and press the 'Enter' key. In the case of the default value just press 'Enter' keyIf STATIC_URL/STATIC_ROOT or MEDIA_URL/MEDIA_ROOT is not configured, then the user will be notified with a warning message and the system will wait for the user confirmation,Warning:Staticroot/urlnotconfiguredWarning:Mediaroot/urlnotconfigured1.Pressqtoquit2.PressanykeytocontinuePress 'Enter' key to continue, else press "q" and press 'Enter' keyThen the user will be prompted for https configuration,Doyouwanthttps?1.Press'n'forno2.PressanykeytocontinueTo configure https, user can press on any key else press 'n' and enter key on keyboardThen the user will prompted of an automatic redirect from http to httpsDoyouautomatichttptohttpsredirect?1.Press'n'forno2.PressanykeytocontinueTo configure autoredirect, user can press on any key else press 'n' and enter key on keyboardUser will be prompted to enter the path for certificate fileEntercertificatepath:After specifying the path to the certificate file, user will be prompted to enter the path to the key fileEntercertificatekeypath:After specifying the path to the key file, user will be prompted to enter the path to the chain fileEnterchainfilepathorpressenterifnochainfileAfter entering the path to the chain file, user will be prompted to specify the https portEntertheport(default:443):If a different port is in use than the default port, enter the port and press enter keyVerify the Apache config file generated in root folder with name as <your_projectname.conf>Copy the the conf file to the Apache site-available folderRun configtest commandEnable the siteReload ApacheCommunicationIf youfind a bug, open an issue.If youhave a feature request, open an issue.If youwant to contribute, submit a pull request.AuthorAfsal Salim,afsals@qburst.comLicenseDjango Server Config Generator is available under the MIT license. See the LICENSE file for more info.
Package: django-server-guardian
A reusable Django app, that fetches and visualizes server health metrics.The data is fetched from theAPI app, that is installed on the client server.InstallationTo get the latest stable release from PyPipipinstalldjango-server-guardianTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-server-guardian.git#egg=server_guardianTODO: Describe further installation steps (edit / remove the examples below):Addserver_guardianto yourINSTALLED_APPSINSTALLED_APPS=(...,'server_guardian',)Add theserver_guardianURLs to yoururls.pyurlpatterns=patterns('',...url(r'^server-guardian/',include('server_guardian.urls')),)Don’t forget to migrate your database./manage.pymigrateserver_guardianFor simple color highlighting of the server status, you can include the following
line to your template:<linkhref="{% static "server_guardian/css/styles.css"%}"rel="stylesheet">Reload now buttonTheserver_list.htmltemplate includes a reload now button, which is useful
for testing or if you don’t want to wait for the cron job to fire again.
It requiresjQueryand if you want to keep the default template, make sure,
you have anextrajsblock in yourmain.htmltemplate.Note, that atm this will reload all servers, so it might take a bit
if you have many servers configured.UsageOnce you’ve installed theAPI appon the client server and added some
endpoitns to your settings, as described there, you can go ahead and configure
your servers.Visit the Django admin for the server guardian, create a newServerobject
and fill out the fields.API URL:This is the url, theAPI appis hooked in under on the client server.Server name:You can simply name the server.Token:You will need to create a token string, that you’ll add here and on the remote server.The other fields are not to be edited and they will be overwritten every time the
guardian fetches new data.Finally you should schedule the management commandguardian_fetchto run
as often as you wish to update your server status (e.g. with cron).Visit/server-guardian/for health status overview.SettingsThere are a few settings, you can work with.DJANGO_PROJECT_ROOT (mandatory!)It’s likely, that you already have this setting. If not, please set it to
the directory where yourmanage.pyfile is located.SERVER_GUARDIAN_EMAIL_ON_STATUSSets on which HTML status codes to send an email to the admins.Default:SERVER_GUARDIAN_EMAIL_ON_STATUS = [403, 404, 405]SERVER_GUARDIAN_DASHBOARD_VIEW_PERMISSIONThis setting gets a function assigned, that is passed to theuser_passes_testdecorator in the dashboard view.Default:SERVER_GUARDIAN_DASHBOARD_VIEW_PERMISSION = lambda u: u.is_superuserContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-server-guardianmakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branchIn order to run the tests, simply executetox. This will install two new
environments (for Django 1.6 and Django 1.7) and run the tests against both
environments.
Package: django-server-guardian-api
API offering health metrics for theDjango Server Guardianapp.Installation and UsageTo get the latest stable release from PyPipipinstalldjango-server-guardian-apiTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-server-guardian-api.git#egg=server_guardian_apiAddserver_guardian_apito yourINSTALLED_APPSINSTALLED_APPS=(...,'server_guardian_api',)Add theserver_guardian_apiURLs to yoururls.pyurlpatterns=[url(r'^server-guardian-api/',include('server_guardian_api.urls')),]As a simple auth method add the security token as described in the README of
theDjango Server Guardianto your settings asSERVER_GUARDIAN_SECURITY_TOKENSERVER_GUARDIAN_SECURITY_TOKEN='asd0hb42t92-example-token-39gh1g3-91hfosj325'Add theSERVER_GUARDIAN_PROCESSORSsetting where you’re endpoint metrics
are defined.SERVER_GUARDIAN_PROCESSORS=('server_guardian_api.endpoints.mailer_mail','myapp.mymodule.myfunction',)The functions defined in this setting must return a dictionary in the following
format{'status':'OK',# must be one of: "OK", "WARNING", "DANGER"'info':'additional text describing the status. e.g. type of error',}That mean, your API endpoint will, if all is correct, return something like this[{'label':'mail_queue','status':'OK','info':"No deferred email queued. That's great!",},{'label':'other_metric',...},]ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-server-guardian-apimakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branchIn order to run the tests, simply executetox. This will install two new
environments (for Django 1.8 and Django 1.9) and run the tests against both
environments.
Package: django-serverless-emailer
Currently only supports failed step functions. This is half-baked so farUsage# settings.pyINSTALLED_APPS=["django_serverless_emailer",# ...]AWS_REGION="us-west-2"# your regionDEFAULT_FROM_EMAIL="an-email@email.com"# your senderEMAIL_HOST="smtp.gmail.com"# your hostEMAIL_PORT=465# your portEMAIL_HOST_USER="an-email@email.com"# your userEMAIL_HOST_PASSWORD=os.getenv["EMAIL_PASSWORD"]EMAIL_USE_SSL=True# if you're using SSLEMAIL_RECEPIENTS="a@b.com,c@d.com"# comma delimited list or a plain list# serverless.yml

functions:
  notify:
    handler: path/to/handler.send_email
    description: Send an email
    layers:
      - { Ref: PythonRequirementsLambdaLayer }# handler.pyimportdjangoimportosos.environ.setdefault("DJANGO_SETTINGS_MODULE","setup.settings")django.setup()fromdjango_serverless_emailerimportnotifydefsend_email(event,_):notify(event,_)
Package: django-serverside
Django-ServersideThis is aDjangoapp that allows you to create
database users directly from the Django admin interface. This is useful for data science
applications. For example, you can allow privileged users to make advanced SQL queries
from tools likeMatlab,Excel,Python,Rand others.Note that creating database users from an application requires the application to have
the privilege to create new database users. This may pose an unacceptable vulnerability
to your database. For example, an attacker may exploit a bug in your application
with which the attacker acquires the privileges to do anything with your database.
Therefore, you should only use this app for django projects that are isolated from the
public and operate in an environment with trusted users.PrerequisitesDjango-Serverside currently only works withPostgreSQL.InstallationYou may install Django-Serverside in your python environment using pip as follows:python-mpipinstalldjango-serversideThen, add serverside to the list of installed applications in the settings file of your
Django project like so:INSTALLED_APPS=["serverside","django.contrib.admin",...]Finally, replace your default user model as described in theDjango documentationby adding the following line to your settings file:AUTH_USER_MODEL="serverside.User"DocumentationTo view the developer documentation, clone the repository to your local machine and open
docs/html/index.html.Running TestsYou may run the tests shipped with Django-Serverside yourself by editing the
tests/settings.py file and providing your own database credentials. The default
connection settings are:DATABASES={"default":{"ENGINE":"django.db.backends.postgresql","HOST":"localhost","PASSWORD":"12345","NAME":"serverside_db","USER":"test_user","TEST":{"NAME":"test_database"},}}From the root folder of this repository run:pythonruntests.pyBuilding WheelsYou may build your own wheel files and documentation by running the following command:pythonpackage.pybuildSince this command will run tests before initiating the actual build, make sure you
have configured your local test database correctly according to theRunning Testssection.
Package: django-serverside-datatable
Django Serverside DatatableThis is a simple package that let you use Server-side Datatable in your Django ProjectSupports datatable features such as Pagination, Search, etc...Installpip install django-serverside-datatableHow to useCreate a django View that inherits fromServerSideDatatableView.
Example (backend):# views.pyfromdjango_serverside_datatable.viewsimportServerSideDatatableViewclassItemListView(ServerSideDatatableView):queryset=models.Item.objects.all()columns=['name','code','description']# urls.py# add the following line to urlpatternspath('data/',views.ItemListView.as_view()),Example (frontend):<!DOCTYPE html><html><head><metacharset="utf-8"><linkrel="stylesheet"href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"></head><body><h1>Items</h1><hr><tableid="items-table"><thead><tr><th>Name</th><th>Code</th><th>Description</th></tr></thead><tbody></tbody></table><scriptsrc="https://code.jquery.com/jquery-3.3.1.min.js"></script><scriptsrc="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script><scriptlanguage="javascript">$(document).ready(function(){$('#items-table').dataTable({serverSide:true,sAjaxSource:"http://127.0.0.1:8000/data/",// new urlcolumns:[{name:"name",data:0},{name:"code",data:1},{name:"description",data:2},],});});</script></body></html>For further customization of Datatable, you may refer the Datatable official documentation.
Package: django-server-side-matomo
Let your Django app perform server side analytics with Matomo. Server side analytics is a great way to get some analytics while respecting user privacy (only you see the data, no internet wide tracking) and performance (no js tracker needed!)QuickstartYou'll need to have celery set up because making the Matomo request in your Django request would be really slow. This project will collect some data from a request using middleware, serialize it, and send it to celery. Works fine with the default celery json serializer. Running celery will not be described here.Install via pipdjango-server-side-matomoAdd to INSTALLED_APPS'server_side_matomo',Add to MIDDLEWARE'server_side_matomo.middleware.MatomoMiddleware'Set the following in settings.pyMATOMO_SITE_ID = '1'  # Your site's Matomo IDMATOMO_API_URL = 'https://your.site.com/piwik.php'MATOMO_TOKEN_AUTH = 'your auth token'MATOMO_TRACK_USER_ID = False  # Set to True to track user ID. Seehttps://matomo.org/docs/user-id/Testing and DevelopmentOnly merge requests with unit tests will be accepted. Please open an issue first if you'd like to propose a feature. I don't plan to add many features to this project myself. Unless other people are interested in doing the work - I have no plans to support things like Google Analytics.TestingA Docker Compose file is provided to quickly try out the project. Just run in a web container:./manage.py testTested with Django 3.0 and Python 3.7.
Package: django-server-tables
django-server-tablesDjango server tables is a library for generating json schema for (DRF)[https://www.django-rest-framework.org] list view serializer. This library provides the capability to control various attributes of a front-end table, such as column width and data type, from the back-end.InstallationUse the following pip command to install the package:pipinstalldjango-server-tablesAdd the following line to your REST_FRAMEWORK configuration:REST_FRAMEWORK={...'DEFAULT_METADATA_CLASS':'server_tables.DefaultMetaData',}UsageAdd theListSchemaMixinto your ModelViewSet:fromserver_tablesimportListSchemaMixinclassMyViewSet(ListSchemaMixin,viewsets.ModelViewSet):"""View set with schema endpoint."""Your ViewSet will now have an additional endpoint at the URLGET viewset_base_url/?schema, with a response like the following:{"field":{"type":"string","required":true,"read_only":false,"label":"Field"}}You can add additional data to the schema using theextra_metadata_fields_info attributein your list serializer:classMySerializer(serializers.ModelSerializer):Meta:model=MyModelfields=['field',]extra_metadata_fields_info={'field':{'width':10}}Now your schema will look like this:{"field":{"type":"string","required":true,"read_only":false,"label":"Field","width":10}}Alternatively, you can use default fields info:fromserver_tablesimportDefaultTableColumnTypesclassMySerializer(serializers.ModelSerializer):Meta:model=MyModelfields=['field',]extra_metadata_fields_info={'field':DefaultTableColumnTypes.NAME,}LicenseThe library is licensed under the MIT License.
Package: django-serve-spa
Django serve SPAServe SPAs with DjangoQuick startpipinstalldjango-serve-spaBuild your SPA and copy the contents of the build intoSPA_ROOT(e.g.path/to/django/spa/).# settings.pySPA_ROOT=BASE_DIR/'spa'# where the built SPA code will liveSPA_URL=''# To serve from /# urls.pyfromkaos_spaimportsettingsasspa_settingsurlpatterns+=[path(spa_settings.SPA_URL,include('kaos_spa.urls')),]Runserver, and visitSPA_URL(/by default). Your SPA will show up.Notesdjango-serve-spais meant to be used for development and isn't recommended for production use. For production, serve the
SPA on its own using tools likenpm serve.django-serve-spais mostly tested with create-react-app apps, but in theory should work with any SPA.Utility scriptsdjango-serve-spacomes bundled with some utility scripts that makes building and copying your SPA project much more
convenient.build-spaBuild your SPA and put it in your django project.Set the following environment variables# requiredSPA_SRC_DIR=/path/to/your/spa/SPA_IN_DJANGO_DIR=/path/to/your/django/project/spa/# what the SPA_ROOT django setting refers to# optionalSPA_URL# If you are not serving on /SPA_BUILD_CMD="npm run build"SPA_BUILD_DIR_PATH='build/'# Where the build command builds the app in its src directoryrunbuild-spaIt'll build your SPA and put it in the right folder in your django project.cm-spa-buildCommits the new build into Git with commit message from arg. If no arg is supplied, commit message defaults to "New SPA
build".Set the following environment variables# requiredSPA_IN_DJANGO_DIR=/path/to/your/django/project/spa/# what the SPA_ROOT django setting refers toruncm-spa-buildDevelopment and TestingIDE SetupAdd theexampledirectory to thePYTHONPATHin your IDE to avoid seeing import warnings in thetestsmodules. If
you are using PyCharm, this is already set up.Running the TestsInstall requirementspip install -r requirements.txtFor local environmentpytestFor all supported environmentstox
Package: django-services
django-services===============A small api integrated to django rest framework (http://django-rest-framework.org/) that makes django admin and all api's calls share the same logic.For instance, if you save a object using django's admin or the api the same logic will be used.**requires python >= 2.7**Running local--------------Create a virtualenv environmentmkvirtualenv --python=python2.7 django_servicesworkon django_servicesIn order to run this project local or to run its tests, you need to run _make pip_ to install all the dependenciesUsage-----Basically, you need to inherit admin.DjangoServicesAdmin class in your admin classfrom django.contrib import adminfrom django_services import admin as django_services_adminfrom .models import Brand, Model, Carfrom .service import BrandService, ModelService, CarServiceclass BrandAdmin(django_services_admin.DjangoServicesAdmin):service_class = BrandServiceclass ModelAdmin(django_services_admin.DjangoServicesAdmin):service_class = ModelServiceclass CarAdmin(django_services_admin.DjangoServicesAdmin):service_class = CarServiceadmin.site.register(Brand, BrandAdmin)admin.site.register(Model, ModelAdmin)admin.site.register(Car, CarAdmin)Then you have to follow django rest framework conventions to create your api.Check the example app!Changelog---------* 0.0.8* overrides django admin's delete_selected action to use service delete* improves example app* documentation* creates requirements file for testing and running the example appcontributing------------1. Fork it!2. Create your feature branch: `git checkout -b my-new-feature`3. Commit your changes: `git commit -am 'Add some feature'`4. Push to the branch: `git push origin my-new-feature`5. Submit a pull request =]
Package: django-services-ds
django-services_dsdjango-services_ds is a Django app to use for demiansoft.Quick startAdd "services" to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'services',]코드를 넣고자 하는 위치에 다음을 추가 한다.{% load services_tags %}
{% make_services %}bethany icon - bxlmedilab icon - facontext examplecontext={"theme":"bethany_ds","services":{"title":"서비스","subtitle":"서브타이틀","type":"icon",# icon or image"items":[{"image_filename":"1.png","icon":"fa-stethoscope",# bxl-dribbble"title":"어려운 케이스 및 당일 사랑니 발치 수술이 가능합니다.","desc":"대학병원으로 의뢰하는 다양한 고난이도의 사랑니를 20여년 경력의 구강외과 전문의가 발치합니다."},{"image_filename":"3.png","icon":"fa-hospital","title":"편리한 접근성으로 내원이 용이합니다.","desc":"교대역 출구 1분 거리에 위치해 있어 찾기가 쉽고 대중교통 이용시 접근성이 편리합니다."},{"image_filename":"4.png","icon":"fa-hand-sparkles","title":"한차원 높은 소독시스템.","desc":"핸드피스 전용 소독기와 모든 체어 및 대기실에 LED 공간 표면 살균기 가동 "}]}}
Package: django-service-status
Django pluggable app to monitor the service statusDocumentationDjango Service Status is a set of checks that are run every time yourhttp://example.com/service_status/page is visited.QuickstartInstall Django Service Status:pip install django-service-statusAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'service_status.apps.ServiceStatusConfig',...)Add Django Service Status’s URL patterns:fromservice_statusimporturlsasservice_status_urlsurlpatterns=[...url(r'^service_status/',include(service_status_urls,namespace='service-status')),...]FeaturesBuiltin checks are:databaseswap memorycelery workersDefault settings: database, swap memoryRunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.5.0 (2023-02-24)Added support for Django 40.4.1 (2022-04-28)Added support for Django 3.20.4.0 (2019-10-28)Added support for Django 2.2Added Redis Status check0.3.0 (2018-10-21)Added support for Django 2.1Warnings do not affect SERVICE_OPERATIONAL0.2.0 (2017-04-12)Added Celery check0.1.0 (2017-04-10)First release on PyPI.
Package: django-service-templates
Manage your service templates via Django Admin.InstallationUsageInstallationpipinstalldjango-service-templatesUsagefromdbtemplatesimportTemplatefromdjango_service_templates.modelsimportServiceTemplateclassHeatTemplate(ServiceTemplate):# your awesome stuffpassdbtemplate=Template.objects.create(name='My Jinja2 Template',content='{{ name }}')HeatTemplate.objects.create(template=dbtemplate,context={'name':'My name'}).render()>'My name'
Package: django-ses-email-backend
Django SesAnother Django Email Backend on top of Amazon Simple Email Service (SES). SupportsDjango 1.9,1.10,1.11,2.0,2.1. Using the latest boto3 to make API Calls, Tested usingmotoWhat is this package aboutEvery web application needs to send email at some point, may it be verification, password resets, updates etc..., Django by default supports SMTP protocol, simply specify smtp credentials and you are ready to go.
But when you use Amazon Services such as SES the preferred way is to access it via its API.So Here it is guys. Simply install it, give the SES credentials, and start sending Emails.
More over if your application is hosted in AWS first ~60000 emails are free every monthTable of ContentsInstallationSES Credential SetupUsageTODOContributionInstallationThis package is available via pip, So install it using pippip install django-sesand add it in your INSTALLED_APPS section of settings.pyINSTALLED_APPS = [
    'django_ses',
     ...
]SES Credential SetupObviously you need to have access to an AWS SES account, generate credentials by followingthis guideor if you already have access keys use it.in your settings.py add it as followsSES_ACCESS_KEY = 'xxx'
SES_SECRET_KEY = 'xxx'
SES_REGION_NAME = 'us-east-1'SES_REGION_NAMEis optional defaults tous-east-1You need toverify domainorverify emailin order to send emails outsideUsageOnce the setup is done you can send emails as usual, your existing calls to emails should work without any modificationsexample 1 - Usingsend_mail()send_mail(subject="Test Subject", message="Message", from_email="from@example.com", recipient_list=['to@example.com'])example 2 - UsingEmailMessageemail = EmailMessage(
    'Subject 1',
    'Body1 goes here',
    'from@example.com',
    ['to1@example.com', 'to2@example.com'],
    reply_to=['another@example.com'],
)

email.send()https://docs.djangoproject.com/en/2.1/topics/emailfor more detailsTODOPre Send, Post Send SignalsContributionSubmit issues toGithub IssuesSubmit patches to thedevelopbranchKindly write tests to justify any additions