Saravanan666/pypi-org huggingface dataset:
Package: dj-mongo-reader
dj-mongo-reader is a Django application can be used to query MongoDB via AJAX requests and render result with several customization options.InstallationInstall from PyPipip installdj-mongo-readerInstall from source codedownload codegit clonehttps://github.com/feifangit/dj-mongo-reader.gitrun<setup.py>fromdj-mongo-readerfolderpython setup.py installFeaturesAble to sendfind,count,collstatscommands to MongoDB via designated URLBasic HTML pages included, only few code is needed towork with your existing CSS frameworkPaginationimplemented, you can customize record number show in each pagePermission check, you can deny a data fetching request based on user’s permission and the query(database, collection, command, criteria).Pick up some keys of the record to fill the table, leave complete record indetail dialogAssigndisplay namesfor keys in MongoDB recordvalue transformation, you can provide Javascript callback functions to process raw value data from MongoDB to a proper text for displayingexport MongoDB data to CSV file (use it carefully for larage amount of records)DEMO and DocumentA Django application runs on heroku.Functionality: A query form and result table included.UI: Bootstrap 3 applied.URL:http://dj-mongo-reader.herokuapp.comSource code Please seeexamplefolderGuidehttp://dj-mongo-reader.herokuapp.comCreditsFan Feifeifan.pub@gmail.combackendNeil Chenneil.chen.nj@gmail.comfrontend
Package: dj-mongo-reader2
dj-mongo-reader is a Django application can be used to query MongoDB via AJAX requests and render result with several customization options.InstallationInstall from PyPipip installdj-mongo-readerInstall from source codedownload codegit clonehttps://github.com/tofu0913/dj-mongo-reader.gitrun<setup.py>fromdj-mongo-readerfolderpython setup.py installFeaturesAble to sendfind,count,collstatscommands to MongoDB via designated URLBasic HTML pages included, only few code is needed towork with your existing CSS frameworkPaginationimplemented, you can customize record number show in each pagePermission check, you can deny a data fetching request based on user’s permission and the query(database, collection, command, criteria).Pick up some keys of the record to fill the table, leave complete record indetail dialogAssigndisplay namesfor keys in MongoDB recordvalue transformation, you can provide Javascript callback functions to process raw value data from MongoDB to a proper text for displayingexport MongoDB data to CSV file (use it carefully for larage amount of records)DEMO and DocumentA Django application runs on heroku.Functionality: A query form and result table included.UI: Bootstrap 3 applied.URL:http://dj-mongo-reader.herokuapp.comSource code Please seeexamplefolderGuidehttp://dj-mongo-reader.herokuapp.comCreditsFan Feifeifan.pub@gmail.combackendNeil Chenneil.chen.nj@gmail.comfrontendCliff Chentofu0913@gmail.comfork and maintenance
Package: dj-ms-auth-router
Django microservice auth SDKDjango auth DB router.Simple database router that helps to split your main database and authentication database.
This may be necessary when splitting a project into microservices.
Let's say you have some Django project and want to split it into microservices.
But all of your microservices need to use the same authentication database.
This router will help you to do that.How it worksDjango project that provides authentication also shares default database with other microservices.Other microservices may have their own databases, but they all use the same authentication database.Which apps are routed toauth_dbdatabase?contenttypessitesauthadminflatpagesredirectsauditlogsessionsModels of these apps are routed toauth_dbdatabase.These apps are hardcoded inms_auth_router.routers.DefaultRouter.List can be extended by addingROUTE_APP_LABELSsetting.If you know that some reusable Django apps should be routed toauth_dbdatabase, please create an issue or pull request.QuickstartAddms_auth_routerto yourINSTALLED_APPSsetting like this:INSTALLED_APPS=[...,'ms_auth_router',...]AddDATABASE_ROUTERSsetting insettings.pyfile or append to existing list:DATABASE_ROUTERS=['ms_auth_router.routers.DefaultRouter',...]Addauth_dbsection toDATABASES:DATABASES = {...'auth_db': {'ENGINE': 'django.db.backends.sqlite3','NAME': BASE_DIR / 'auth.sqlite3',},...}Finally, addAUTH_DBsetting:AUTH_DB='auth_db'Without this setting router will usedefaultdb connection.Note: To get session authentication working between microservices, theSECRET_KEYsetting must be the same
in all microservices.Use with custom auth appIf you're using custom auth app and want it to be routed toauth_dbdatabase,
you need to addROUTE_APP_LABELSsetting:ROUTE_APP_LABELS=['my_custom_auth_app',]
Package: djmssql
Django Microsoft SQL Server backend.I refer to djang-pyodbc-azure (https://github.com/michiya/django-pyodbc-azure).RequirementsDjango 3.1minitds (https://github.com/nakagami/minitds) recently released.Installation$ pip install djmssql djangoDatabase settings exampleDATABASES = {
    'default': {
        'ENGINE': 'djmssql',
        'NAME': ...,
        'HOST': ...,
        'USER': ...,
        'PASSWORD': ...,
    }
}
Package: dj-multidomain
dj-multidomainMultiple Domain Middleware for DjangoThis middleware enables Django projects to route requests to different URL configurations based on the domain of the
incoming request. It offers both domain-based URL routing and automatic redirection to another domain for specific
domains. It's particularly useful for projects hosted across multiple domains. Developed by Ferhat Mousavi.Supported (tested) VersionsPython: 3.10 and aboveDjango: 4 and aboveSample Projectdj-multidomain exampleInstallationInstall the package using pip:pip install dj-multidomainAdd the Middleware to your Django settings:MIDDLEWARE = [
    ...
    'dj-multidomain.middleware.MultipleDomainMiddleware',
    ...
]**Configure the domains and their associated URL configurations in settings.py using the MULTI_DOMAIN_CONFIG setting:
**MULTI_DOMAIN_CONFIG = {
    'domain1.com': 'path.to.urls_for_domain1',
    'domain2.com': 'path.to.urls_for_domain2',
    ...
}(Optional for redirect domains)Configure the domains and their associated domain configurations in settings.py
using the MULTI_REDIRECT_CONFIG setting:MULTI_REDIRECT_CONFIG = {
    "not_my_desire_domain1.com": "my_desire_domain1.com",
    "not_my_desire_domain2.com": "my_desire_domain2.com",
    ...
}samplepath.to.urls_for_domain1filefrom django.urls import path, include

urlpatterns = [
    path('', include('domain1_app.urls')),
](Optional) For common URLs accessible from any domain, specify the COMMON_URLS setting:COMMON_URLS = 'path.to.common_urls'samplepath.to.common_urlsfilefrom django.contrib import admin
from django.urls import path

urlpatterns = [
    path('admin/', admin.site.urls),
](Optional) If you are in DEBUG mode and want a fallback for unrecognized domains, specify the DEFAULT_DOMAIN
setting:DEFAULT_DOMAIN = 'path.to.default_urls'UsageWith the middleware set up, incoming requests will be routed based on their domain to the specified URL configurations.
URLs defined in COMMON_URLS will be accessible from any domain.Support & ContributionFor issues, feedback, or feature requests, please open an issue on the GitHub repository. Contributions are welcome;
feel free to submit a pull request.
Package: djmyframework
通用后台框架 3.7特性在settings 配置INSTALL_APPS即可.无需配置urls,文件,约定大于配置.功能按apps目录分离.前后端分离,后端只返回json快速生成CURD模型多国语言python manage.py makemessages  -i venv -l enpython manage.py  compilemessages -l en不要使用 django-admin ，会把 venv 带进去支持OpenApi 自动生成文档,客户端python manage.py generate_swagger -f json -o static/api.json使用 idea OpenAPI Generator 插件生成客户端,On an OpenAPI Definition JSON or YAML file: Code -> OpenAPI -> Generate from document使用 jinja2 模板引擎放弃rest ,不适合业务status_code 不够使用地址/xx/{id} 形式,容易产生缓存,不容易测试,批量删除与修改不方便rest_framework 默认是使用csrf_exempt只使用 post ,get 方法设置apps目录pycharm->projectstructure->设置apps目录为source新建表结构python3manage.pymigrate前端使用库jqueryhttps://jquery.com/表单 jquery.formhttp://malsup.com/jquery/form/ui 框架 bootstrap-3https://v3.bootcss.com/Bootstrap Tags Inputhttp://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/弹出框 dialoghttp://demo.jb51.net/js/2011/artDialog/_doc/API.html表格 bootstrap-tablehttps://examples.bootstrap-table.com/index.html?bootstrap3#view-source选择框 select2https://select2.org/日期框 daterangepickerhttps://www.daterangepicker.cn/progress.jshttps://usablica.github.io/progress.js/vue 2.6https://vuejs.org/ant design vuehttps://www.antdv.com/docs/vue/introduce-cn/redoc使用 swagger_auto_schema 添加注释文档query_serializer 查询参数 get/post 使用request_body 请求主体 post 用responses 返回生成 json/yaml 文件python manage.py generate_swagger -f yaml - >static/yaml.jsonOpenAPI Generator 自动生成客户端文件 pycharm 插件 code -> OpenApi需要解决统一用 swagger_auto_schema 添加api文档注释,并且增加参数校验侵入度低,使用annotations辅助返回response 统一带 code 参数有,需要统一增加,返回错误代码,也许动态增加,建议不使用动态生成rsp请求 body ,query, 需要添加filter,page_size 参数快速上手 开发流程创建 app与 django 命令相同,不过默认使用 framework 下的 app 模板pip3installdjmyframework
mkdirxxxProjectcdxxxProject
djmyframework_initpython3manage.pycreate_appxxxApp
python3manage.pymigrate
python3manage.pycreate_root
python3manage.pycreate_role
python3manage.pycreate_menu-mconfig.system_menu创建增删改查定义好 models 后, 执行自动创建 view,template 模板python3manage.pycreate_curd{app_name}.{Model}部署安装依赖pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/静态文件部署python manage.py collectstatic启动服务
参看 supervisorctl 用法mysupervisorctl start
Package: dj-myghanta
Dj myghanta is a Django app to create MySQL timestamp field for Django models.Quick startAdd “myghanta” to your INSTALLED_APPS like this:```
INSTALLED_APPS = (
    ...
    'myghanta',
)
```Import it in your models like:```
from myghanta.fields import MysqlTimeStampField
```Create model fields like:```
   created_at = MysqlTimestamp(auto_now_add=True)
   updated_at = MysqlTimestamp(auto_now=True)
```
Package: dj-mypypi
This package provides a private python package index based on djangoDocumentationThe full documentation is athttps://dj-mypypi.readthedocs.io.QuickstartInstall dj-mypypi:pip install dj-mypypiAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'djmypypi.apps.DjMyPypiConfig',...)Add dj-mypypi’s URL patterns:fromdjmypypiimporturlsasdjmypypi_urlsurlpatterns=[...url(r'^',include(djmypypi_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 (2020-02-29)First release on PyPI.
Package: dj-mypypi2
django app implementing pypi serverDocumentationThe full documentation is athttps://dj-mypypi2.readthedocs.io.QuickstartInstall django app implementing pypi:pip install dj-mypypi2Add it to yourINSTALLED_APPS:INSTALLED_APPS=(...'djmypypi2.apps.DjMyPypi2Config',...)Add django app implementing pypi’s URL patterns:fromdjmypypi2importurlsasdjmypypi2_urlsurlpatterns=[...url(r'^',include(djmypypi2_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2021-04-24)First release on PyPI.
Package: dj-nepali-address
# dj-nepali-addressdj-nepali-address is a Django app to use predefined province, district and municipality.
You may add new data as requiredDetailed documentation is in the “docs” directory.Quick startAdd “nepali_address” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'nepali_address',
]Runpython manage.py migrateto create the nepali_address models.Runpython manage.py loaddata nepali_addressto load data in nepali_address models.DocumentationFor full documentation, visit [dj-nepali-address-system.readthedocs.io](https://dj-nepali-address-system.readthedocs.io/en/latest/).
Package: djnext
Isomorphic UI Development with Decorator pattern for Django with:nextjs out of the box experience for frontend development,rendering of nextjs pages with context in Django with NextJS template engine.For fun & profitRun the example projectRun this commands as non root:git clone https://git.yourlabs.org/oss/djnext
cd djnext
pip install --user --editable .[dev]
yarn install
djnext djnext  # required for yarn dev to run
yarn dev  # run localhost:3000
djnext dev  # run localhost:8000Choose NextJS page template in DjangoExample project lives in src/djnext_example, seesrc/djnext_example/artist/urls.py:CreateView.as_view(
    model=Artist,
    fields=['name'],
    success_url=reverse_lazy('artist_list'),
    template_name='create.js',
)The template backend you added will make a request to the nextjs server you
have on port 3000 with yarn dev.Djnext commandRun your manage.py djnext or yourproject djnext if your project has an entrypoint.This will watch static/pages directories of all apps in INSTALLED_APPS, and build
the pages/ directory, so that yarn dev will find it.On port 8000 we don’t yet have auto frontend code reload, but you have it on
port 3000 with djnext command running at the same time.Install in your projectAdd to ‘djnext’ to INSTALLED_APPS, adddict(BACKEND='djnext.Backend')to TEMPLATES.NoteTo have the dev command, add crudlfap to INSTALLED_APPS.With LOVE from POITOU CHARENTE∞CreditThanks to frontend engineer Thomas Binetruy for participating
Package: djnodb
Custom django testrunner that eliminates test database creation when running tests.Installationpip install djnodbThis will place the custom testrunner (runner.py) at the root of your project. Alternatively you can move it to any part of your application you desire.Usage (default)Override django’s default testrunner by adding the following to your settingsTEST_RUNNER = 'djnodb.runner.NoDbTestRunner'
Package: dj-nodb
Custom django testrunner that eliminates test database creation when running tests.Installationpip install dj-nodbThis will place the custom testrunner (runner.py) at the root of your project. Alternatively you can move it to any part of your application you desire.Usage (default)Override django’s default testrunner by adding the following to your settingsTEST_RUNNER ='dj-nodb.runner.NoDbTestRunner'
Package: dj-notebook
Django + Jupyter notebooks made easyA Jupyter notebook with access to objects from the Django ORM is a powerful tool to introspect data and run ad-hoc queries.Full documentation available atdj-notebookFeaturesEasy ipython notebooks with DjangoBuilt-in integration with the imported objects from django-extensionsInheritance diagrams on any object, including ORM modelsConverts any Django QuerySet to Pandas DataframeHandy function for displaying mermaid charts inGenerates visual maps of model relationsInstallationUse your installation tool of choice, here we use venv and pip:python-mvenvvenvsourcevenv/bin/activate
pipinstalldj_notebookUsageFirst, find your project'smanage.pyfile and open it. Copy whatever is being set toDJANGO_SETTINGS_MODULEinto your clipboard.Create an ipython notebook in the same directory asmanage.py. In VSCode,
simply add a new.ipynbfile. If using Jupyter Lab, use theFile -> New -> Notebookmenu option.Then in the first cell enter:fromdj_notebookimportactivateplus=activate()# If that throws an error, try one of the following:# DJANGO_SETTINGS_MODULE_VALUE aka "book_store.settings"# plus = activate("DJANGO_SETTINGS_MODULE_VALUE")# Point to location of dotenv file with Django settings# plus = activate(dotenv_file='.env')In future cells, you can now load and run Django objects, including the ORM. This three line snippet should give an idea of what you can now do:fromdjango.contrib.authimportget_user_modelUser=get_user_model()User.objects.all()Usage PlusBut wait, it gets better!When you activated the Django environment, you instantiated a variable called 'plus'. The 'plus' variable  is an object that contains everything loaded from django-extensions'shell_plus. Here's a demonstration, try running this snippet:plus.User.objects.all()We also provide a utility for introspection of classes, which can be useful in sophisticated project architectures. Running this code in a Jupyter notebook shell:plus.diagram(plus.User)Generates this imageQuerySet to Dataframeplus.read_frame(plus.User.objects.all())Check out the official documentation for more things you can do!dj-notebook official documentationContributorsDaniel Roy GreenfeldCody AntunezGeoff BeierSaransh SoodAnna ZhydkoTejo KaushalSimon DavyNullDave ParrSiew-Yit YongSpecial thanksThese are people who aren't in our formal git history but should be.Tom Prestondid seminal work on Python paths that later became the foundation of dj-notebookEvie Cluttonwas co-author of a pull request and they don't show up in the contributor  list aboveTim Schillingassisted with themodel_graphmethodCharlie Dentonis responsible for django-schema-graph, which we leverage as part of themodel_graphfeatureChristopher Clarkebuiltdjango-pandas, which dj-notebook usesTom PrestonNullTim SchillingCharlie DentonChristopher  ClarkeConstructionThis package was created withCookiecutterand thesimplicityproject template.
Package: djnotification
DjNotification - Django Notification AppOverviewDjNotificationis a Django app designed to facilitate real-time notification management in a Django project. It provides features similar to Firebase Cloud Messaging (FCM) with WebSocket integration for seamless communication.Key FeaturesNotification Groups:Create and manage notification groups with different types, including public, private, and custom groups.Notification Types:Send various types of notifications, such as cards, modals, image-only, and top banners.User Subscriptions:Allow users to subscribe and unsubscribe from notification groups.Django Admin Integration:Manage subscriptions, groups, and notifications through the Django admin interface.REST API Support:Use Django REST Framework to create, retrieve, and paginate notifications through API endpoints.Scheduled Notifications: Admin can schedule notifications for the future by setting a specific time for them to be sent.Expiration Time for Notifications: Notifications can have an expiration time, and users who join a group with active notifications can receive those notifications.Real-time Member Presence: Users can see real-time updates of members present in each group.Send Notifications via API or Admin Panel: Notifications can be sent programmatically via API using theNotificationAPIViewor manually created and sent through the Django admin panel.Example UsageInstall DjNotificationpip install djnotificationAdd DjNotification toINSTALLED_APPSin settings.py:INSTALLED_APPS = [
# ...
'djnotification',
# ...
]Run Migrationspython manage.py migrateRun Celery WorkersEnsure Celery is installed (pip install celery) and run the Celery worker:celery -A your_project_name worker -l infoDefine Notification GroupsDefine notification groups using Django admin or your application code. Groups are instances of the Group model in the djnotification app.Send Notification from API or AdminSending Notification from API or Admin panel action.Project ConceptImagine DjNotification as a Django-based notification system similar to Firebase Cloud Messaging (FCM) with WebSocket integration. It allows for real-time communication and notification delivery to users or groups, making it a powerful tool for keeping users informed and engaged in your Django project.ContributingContributions are welcome! Please follow these guidelines when contributing to the project. Fork the repository, create a branch, make your changes, and submit a pull request.LicenseThis project is licensed under the MIT License.
Package: djnotty
Demo https://djnotty.herokuapp.com/===================================Demo admin https://djnotty.herokuapp.com/admin Cred: guest password===================================================================Installation============Put ``djnotty`` to ``settings.py`` Put``url(r'^djnotty/', include('djnotty.urls', namespace='djnotty')),``to ``urls.py``Override default ``admin/base_site.html`` or copy this code to customadmin template {% load static %} {% block extrahead %}.. raw:: html<script>var djnotty_url = '{% url 'djnotty:messages' %}'</script><script src="https://code.jquery.com/jquery-1.12.0.min.js"></script><script src="{% static 'djnotty/js/packaged/jquery.noty.packaged.min.js' %}"></script><script src="{% static 'djnotty/js/notty.js' %}"></script>{{ block.super }} {% endblock %}If you want use djnotty on non admin pages:::<script>var djnotty_url = '{% url 'djnotty:messages' %}';var csrf_token = '{{ csrf_token }}'; // for unauthorized users</script><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><script src="{% static 'djnotty/js/packaged/jquery.noty.packaged.min.js' %}"></script><script src="{% static 'djnotty/js/notty.js' %}"></script>How to create messages======================Create notification for user~~~~~~~~~~~~~~~~~~~~~~~~~~~~::from djnotty import noty_builderfrom djnotty.models import Messagefrom django.contrib.auth.models import GroupMessage.objects.create_for_object(%TARGET_OBJECT%, users=[%USER_OBJECT%], builders=[noty_builder.Text('Specific for user'),noty_builder.Close()])Create notification for group and user~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~::from djnotty import noty_builderfrom djnotty.models import MessageMessage.objects.create_for_object(%TARGET_OBJECT%, groups=[Group.objects.get(name='superadmin')],users=[%USER_OBJECT%], builders=[noty_builder.Text('Specific for user and group'),noty_builder.Close()])Create globally message:~~~~~~~~~~~~~~~~~~~~~~~~::from djnotty import noty_builderfrom djnotty.models import MessageMessage.objects.create_globally(builders=[noty_builder.Text('Specific for user and group'),noty_builder.Close()])Mark as read============::from djnotty.models import MessageMessage.objects.create_globally(builders=[noty_builder.Text('Specific for user and group'),noty_builder.Close()])Message.objects.mark_as_viewed_for_object(%TARGET_OBJECT%,%USER_MODEL%)noty\_builder~~~~~~~~~~~~~Text:~~~~~::Put text to popup windowClose:~~~~~~::Notification mark as read for user after click.Close(url='redect me after click')Linked:~~~~~~~::Redirect to url after click on notificationWhat is %TARGET\_OBJECT%~~~~~~~~~~~~~~~~~~~~~~~~Djnotty using django\_content\_types framework for identify records.
Package: djoauth2
Source code:https://github.com/locu/djoauth2Documentation:http://djoauth2.readthedocs.org/Issue tracker:https://github.com/locu/djoauth2/issuesMailing list:https://groups.google.com/forum/#!forum/djoauth2What is DJOAuth2?DJOAuth2 is an implementation of asanesubset of theOAuth 2specification, which is described by theOAuth WebsiteasAn open protocol to allow secure authorization in a simple and standard
method from web, mobile and desktop applications.The goal of this implementation is to provide a well-structured Django
application that can be easily installed to add OAuth 2.0 provider capability to
existing projects. The official specification is broad, and allows for
many different ways for clients and servers to interact with each other. This
implementation is a secure subset of these interactions in order to make it as
easy as possible to reap the benefits of OAuth without having to struggle with
the more difficult parts of the spec.OAuth, and this implementation, are best suited to solving the following
problems:Allowing for fine-grained API control — you want your users to choose which
applications have access to their data.Acting as an authentication server, allowing other sites to “Log in with
<your app>”.ContributingInterested in contributing? Great! Check outthe contribution guide, which
includes instructions for setting up dependencies, generating migrations, and
running the test suite.