Saravanan666/pypi-org huggingface dataset:
Package: django-orion-model
A Django App to manage aFiware Orioncontext broker entities as Django Model Objects.InstallIn order to intall  simply use pippip install django_orion_modelUsageSimply add django_orion_model to your settings.py:INSTALLED_APPS=['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles',...'django_orion_model',...]ORION_URL="https://yourorion:1234"ORION_SCOPE="/desiredscope"ORION_EXPIRATION=200//livingtimeoflocalvaluesTo define a Entity Model simply define a class in your models.py Using OrionEntity as Class father and use Orion fields to properties expected to live in the context broker.fromdjango_orion_modelimportOrionEntityiclassWasteManagementStage(OrionEntity):name=OrionCharField("name",max_length=1024,blank=True)description=OrionTextField("description",max_length=1024,blank=True)Available Field types for Orion Context ContextBroker:OrionCharFieldOrionTextFieldOrionFloatFieldOrionDateTimeFieldAn orion entity have a Default Field to manage Communication With Orion:context_broker(ForeingKey-ContextBroker): The Orion Context ContextBroker that manages the entityservice_path(ForeingKey-Scope): The service-path  where the entity lies.orion_id(CharField): The ID of the entity in Orion.type(CharField): The type of the entity in Orion.data(JSONField): A local repository of the last known values of the entity.updated(ArrayField-CharField): The name of the Orion field updates since las connection.expiration(DateTimeField): The time when the local data is considered obsolete.status(CharField): A predefined text that indicates the communication. Expected values:OK Everything is OK and up to dateOFFLINE Set to Disable communication to OrionMISSING Indicates that the Entity not exist in OrionCREATING Set to Create the entity into Orion.CREATED Indicates that the entity is created but is values are not yet pulled from Orion(Transitory)PENDING_WRITING Indicates that the entity is performing a push to Orion(Transitory).PENDING_READING Indicates that the entity is performing a pull to Orion(Transitory).AWAIT_REFRESH The pull has failed and the entity is expecting a new opportunity to retry.AWAIT_REWRITING The push has failed and the entity is expecting a new opportunity to retry.error(TextField): IF the connection have a problem the Orion response is stored here.Entity BehaivourThe entity is expected to pull values from Orion after its creation, when an orion attributes is read and expiration time is up, before saving to database and after values are updated to orion.
The entity is expected to push  values to Orion after a Orion values is Set.Some status Values forces Some behavior:OFFLINE Set to Disable communication to OrionCREATING Set to Create the entity into Orion.This library is partially funded  by theWaste4Think proyectthat  has received funding from the European Union’sHorizon 2020research and innovation program under grant agreement 688995.
The dissemination of results herein reflects only the author’s view and the European Commission is not responsible for any use that may be made of the information it contains.
Package: django-orm
Currently the only supported what was django-postgresql.
But I’m working for some features available for all supported backends (postgresql, sqlite,
mysql), as orm connection-pool and low-level cache.If you want to know in detail what it offers for each database, check the documentation.Documentation:http://readthedocs.org/docs/django-orm/en/latest/Project page:http://www.niwi.be/post/project-django-orm/
Package: django-orm2json
A library for converting ORM Django models to JSON format. You can easily work with a simple request, as well as nested Many To Many.Quick startInstall packages:pip install django-orm2jsonAdd “orm2json” to your INSTALLED_APPS setting like this (Optional. Under future functionality):INSTALLED_APPS = [
    ...
    'orm2json',
]Example code:import Orm2JSON

serialize_object = Orm2JSON(
    User.objects.filter(**filter),
    (
        'username',
        'email',
        'avatar',
        {
            'game': ['game_id', 'title'],
            'category': [
                'category',
                'internal_name',
                {
                    'title': [
                        'name',
                        'date'
                    ]
                }
            ],
        },
    ),
    image_size={
        'avatar': 'icon',
    },
    add_static={
        'custom_field': 'text'
    }
)
type(serialize_object.serialize())
>> <class 'list'>
type(serialize_object.serialize_json())
>> <class 'str'>Supported fields:FieldSupportedAutoField?BigAutoField?BigIntegerFieldYESBinaryField?BooleanFieldYESCharFieldYESDateField?DateTimeField?DecimalField?DurationField?EmailField?FileField?FilePathField?FloatFieldYESImageField?IntegerFieldYESGenericIPAddressField?NullBooleanField?PositiveIntegerFieldYESPositiveSmallIntegerFieldYESSlugField?SmallIntegerField?TextFieldYESTimeField?URLField?UUIDField?ForeignKeyYESManyToManyFieldYESOneToOneField?? - Not tested
Package: django-orm-filter
django-orm-filterdjango drf query filterInstallpipinstalldjango-orm-filterUsefromorm_filter.filterimportOrmFilter,FQclassUserViewSet(viewsets.ModelViewSet):filter_backends=[OrmFilter,]# 设置需要匹配的查询参数orm_fields=[# 基本的 and 查询# date_joined__lt=2021-12-09&date_joined__gt=2021-12-1FQ(r'date_joined__(lt|gt)$'),# 获取查询参数数组# date_joined__range=2021-12-10&date_joined__range=2021-12-12'FQ(r'date_joined__range$',many=True),# 对查询的key和value进行转换# ids=[1,2,10]FQ(r'ids$',fv=json.loads,error_text='ids 必须是json数组',repl='id__in'),# 正则表达式查询# email__regex=gmail.com$FQ(r'email__regex$'),# or 查询# is_staff=false&email__iendswith=qq.com# filter( Q(is_staff=False) | Q(email__iendswith=qq.com) )FQ(r'email__iendswith$',cond='or'),FQ(r'is_staff$',json.loads,cond='or'),# not 查询# email__not=ajanuw@qq.com# ~Q(email='ajanuw@qq.com')FQ(r"email__not$",is_not=True,repl='email')]
Package: django-orm-magic
author:Martín Gaitán <gaitan@gmail.com>homepage:https://github.com/mgaitan/django-orm-magicdocumentation:seethis notebookDefine your django models in an IPython cell and use them on the fly.
Let the magic do the boring part.Django ORM isn’t conceived to be used standalone. Even for a trivial case, you need to configure a database, create an app, etc. This magic handle that automatically, and then import every model to your interactive session.InstallYou can install or upgrade via pippip install -U django-orm-magicor directly from the repository using the%install_extmagic command:In[1]: %install_ext https://raw.github.com/mgaitan/django-orm-magic/master/django_orm_magic.pyBasic usageOnce it’s installed, you can load it with%load_ext django_orm_magic. Then define your models in a cell started with the cell magic%%django_orm.
For example:In[2]: %load_ext django_orm_magic


In[3]: %%django_orm

       from django.db import models

       class Poll(models.Model):
           question = models.CharField(max_length=200)
           pub_date = models.DateTimeField('date published')

       class Choice(models.Model):
           poll = models.ForeignKey(Poll)
           choice_text = models.CharField(max_length=200)
           votes = models.IntegerField(default=0)And it’s done. Every model is synced in a sqlite database nameddb.sqlitein your current path and imported automatically:In[4]: Poll.objects.all()
Out[4]: []

In[5]: from django.utils import timezone
       p = Poll(question="What's new?", pub_date=timezone.now())
       p.save()See thedocumentationfor further details.Seeherefor another exampleChangelog0.3.1 / 2014-01-21Fix bug#4(now install via pip works)0.3 / 2013-12-14Added%django_settingsmagicAdded a tutorial notebook0.2 / 2013-12-11Moved the code to github.Packaged and registered in PyPi0.1 / 2013-10-29First public release (as agist)
Package: django-orsay
A toolkit for doing static site generation for sites that are photo heavy. Was
built to create online photo albums for trips. Most static site generators
emphasize blogging, this builds on django templating to quickly create a
one-off site like a travel album.This isn’t really ready to be packaged and put up on pypi yet, not sure if it
ever will be. In the meantime, if it is helpful to you, feel free to use it.Supportsdjango-orsay has been tested with:Django 4.1 using Python 3.11
Package: django-ory-auth
Ory DjangoThis package provides integration with Ory Cloud or Ory Kratos for your django applicationInstallingYou can simply runpip install django_ory_authorpoetry add django_ory_authorpipenv install django_ory_authAdddjango_ory_authtoINSTALLED_APPSINSTALLED_APPS=["django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.sites","django_ory_auth"]ConfigurationYou need to add these variables to your settingsORY_SDK_URL=https://projectId.projects.oryapis.comORY_UI_URL=https://projectId.projects.oryapis.com/uiLOGIN_URL=https://projectId.projects.oryapis.com/ui/logindjango_ory_authprovides authentication backend. You must replaceModelBackendwithOryBackendin theAUTHENTICATION_BACKENDSsettingAUTHENTICATION_BACKENDS=["django_ory_auth.backend.OryBackend",]Last step is to adddjango_ory_auth.middleware.AuthenticationMiddlewareunderdjango.contrib.auth.middleware.AuthenticationMiddlewareMIDDLEWARE=[…"django.contrib.auth.middleware.AuthenticationMiddleware","django_ory_auth.middleware.AuthenticationMiddleware",...]Using context processorsThe package provides context processor to provide the following urlslogin_urllogout_url (for authenticated users)signup_urlrecovery_urlverify_urlprofile_url (available for authenticated users)to enable context processor adddjango_ory_auth.context.processorto thecontext_processorsetting
Package: django-oscar-amazon-payments
This package provides integration betweendjango-oscarandAmazon Payments (Login and Pay with Amazon).Tested withPython 2.7,Django 1.6anddjango-oscar 0.7.3.SetupFollow the instructions on configuring your website for Login and Pay with Amazon underhttp://docs.developer.amazonservices.com/en_US/apa_guide/APAGuide_GettingStarted.html.
Note that the website setup requires the “Allowed JavaScript origin” to be a HTTPS
URL, so you won’t be able to test Amazon Payments integration with a site run using
the Django runserver command.You will also need an Amazon MWS API key and secret key. These are used to
interact with the Amazon MWS Off-Amazon Payments API to actually process the
payments. Seehttp://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Overview.htmlAdd ‘amazon_payments’ to your INSTALLED_APPS, and also add the following settings in your django settings:AMAZON_PAYMENTS_ACCESS_KEYAMAZON_PAYMENTS_SECRET_KEYAMAZON_PAYMENTS_SELLER_IDAMAZON_PAYMENTS_CLIENT_IDAMAZON_PAYMENTS_CURRENCYOther settings:AMAZON_PAYMENTS_API_ENDPOINT: defaults to “https://mws.amazonservices.com/OffAmazonPayments_Sandbox/2013-01-01”AMAZON_PAYMENTS_API_VERSION: defaults to “2013-01-01”.AMAZON_PAYMENTS_IS_LIVE: defaults to False. Set True to enable live payments.Sandbox siteThe sandbox site demonstrates how you can set up 2 different Amazon Payments
checkout procedures:One-step checkout: User selects the shipping address and payment method
in one step. Clicking the “Place order” button will immediately attempt to
charge the user’s Amazon account and takes them to the confirmation / thank you
page if successful. Assumes there is one shipping method.Multi-step checkout: The default oscar checkout process.Automatic PaymentsFromhttp://docs.developer.amazonservices.com/en_US/pay_with_amazon_automatic_payments/APAGuide_Introduction.html:With the automatic payments feature, buyers can pre-authorize payments for
future purchases. This enables you to charge a buyer’s Amazon Payments account
on a regular basis for subscriptions and usage based billing without requiring
the buyer to authorize a payment each time.Automatic payments are disabled by default. To enable such payments, override
the Basket model in your oscar project to add a “has_subscriptions” property
that returns True where appropriate. This has been done in the sandbox site, so
you will see the “Automatic payments” widget during checkout.
Package: django-oscar-api
This package provides a RESTful API fordjango-oscar.UsageTo use the Oscar API application in an Oscar E-commerce site, follow these
steps:Install thedjango-oscar-apipackage (pip installdjango-oscar-api).Addrest_frameworkandoscarapitoINSTALLED_APPSINSTALLED_APPS=[...'rest_framework','oscarapi',]Add the application’s urls to your urlconffromdjango.urlsimportincludeurlpatterns=(# all the things you already havepath("api/",include("oscarapi.urls")),)Apply migrations:python manage.py migrateSee theDocumentationfor more information and theChangelogfor release notes.
Package: django-oscar-approval
django-oscar-approvalOrder/Product approval extension for Django OscarGetting startedInstallationAdd'oscar_approval'toINSTALLED_APPSand run:./manage.py syncdbConfigurationEdit yoursettings.pyto set the following settings (example):OSCAR_LINE_APPROVAL_STATUS = statuses.PENDING_AUTHORISATION
OSCAR_ORDER_APPROVAL_STATUS = statuses.PENDING_AUTHORISATIONInclude approval urls in your application:from oscar_approval.apps.approval.app import application as approval_application

(r'^approval/', include(approval_application.urls)),Integration into the projectYou may choose to integrate any of the following components:Product model extension:from oscar_approval.apps.catalogue.abstract_models import AbstractProduct as ApprovalAbstractProduct

    ...
class Product(AbstractProduct, ApprovalAbstractProduct):
    ...Basic behaviour on receiving'order_placed'signal:from oscar.apps.order.signals import order_placed
from oscar_approval.apps.order.receivers import receive_order_placed

order_placed.connect(receive_order_placed)This receiver simply setsOSCAR_LINE_APPROVAL_STATUSandOSCAR_ORDER_APPROVAL_STATUSfor lines and orders that require approval.Pin authorisation tab in the user profile:…Dashboard application for managing reviewers and viewing approval event logs:Extend user profile:from oscar_approval.apps.customer.abstract_models import AbstractProfile as ApproverProfile

class Profile(ApproverProfile):
    ...Include dashboard application urls:from oscar_approval.apps.dashboard.app import application as approval_dashboard_application

(r'^dashboard/approval/', include(approval_dashboard_application.urls))
Package: django-oscarbot
TG Core from OscarTelegram bot core only for webhooks way workingTelegram bot core, created in django style with routing and views(handlers) where you
can use included builders for menu or messagesInstalling / Getting startedThis is package only for using with Django project.pipinstalldjango-oscarbotInitial ConfigurationIn settings.py file you need to specify application for tg use:OSCARBOT_APPS=['main']# set Telegram api url in your env variables TELEGRAM_URL# set Telegram message parse mode:TELEGRAM_PARSE_MODE='HTML'# orTELEGRAM_PARSE_MODE='MARKDOWN'Run django server and openlocalhost:8000/admin/and create new bot,
at least fill bot token for testing abilityFeaturesUser modelfromoscarbot.modelsimportUsersome_user=User.objects.filter(username='@maslov_oa').first()Menu and Buttons builderfromoscarbot.menuimportMenu,Buttonbutton_list=[Button(text='Text for callback',callback='/some_callback/'),Button(text='Text for external url',url='https://oscarbot.site/'),Button(text='Web app view',web_app='https://oscarbot.site/'),]menu=Menu(button_list)Message builderfromoscarbot.shortcutimportQuickBotquick_bot=QuickBot(chat=111111111,message='Hello from command line',token='token can be saved in DB and not required')quick_bot.send()Application with routing and views(handlers):example applicationLong polling server for testingpythonmanage.pyrunbotUpdate messages available# TODO: work in progressMessages log# TODO: work in progressLinksProject homepage:https://oscarbot.site/Repository:https://github.com/oscarbotru/oscarbot/LicensingThe code in this project is licensed under MIT license.
Package: django-oscar-bundles
An extension on top of django-oscar providing product bundle functionality.Use CasesBundles can be used to recommend groups of products from another groups products.
Bundles do not include offers - however it may be used in combination with an offer.The user has a bed and a mattress in their cart - recommend a sheet set.The user has a pillow in their cart - recommend adding another pillow and sheet set with copy about a discount. The discount is set up in Oscar’s offer section.Add a bundle group for a bed base and mattress. Each product has varients with sizes. Enter common copy and images on the group retaled to the parent product. Add bundles for various sizes (Queen size bed matches queen size mattress and medium sized pillow)Changelog2.2.0Add support for django-oscar 3.2.2Add support for django 4.22.1.0Added the ability to temporarily deactivate a bundle.Add Python 3.11 to test suite.Add Oscar 3.2 to test suite.Fix deprecation warnings for Django 4.0 and 4.1Upgrade JS build process from Node.js v14 to v18.2.0.1Fix bug in bundle edit form when removing suggested parents.2.0.0Oscar 3.0 Compatibility1.0.00.4.1Fix bug breaking image uploads in the bundle group API.0.4.0Add support for django-oscar 2.x.Drop support for django-oscar 1.x.0.3.3Internationalization0.3.2Make “Headline” field a TextField so it can store long HTML strings.0.3.1Add new “Headline” field to bundle groups for holding UI text.0.3.0MAJOR rewrite of bundle functionality with a much improved dashboard interface.0.2.8Fix Django 2.0 Deprecation warnings.0.2.7Adds support for Django 1.11 and Oscar 1.50.2.6Improve testing with tox.0.2.5Updated dependencies0.2.4Add view caching to bundles API0.2.3Fix 500 when deleting a bundle group0.2.2Add searching and filtering0.2.1Added working bundle group bundle_set editing in dashboard0.2.0Add optional bundle groupings0.1.0Initial release.Renamed package tooscarbundlesfor consistency.
Package: django-oscar-easyrec
This package provides integration with the recommendation system,easyrec.  It is designed to
integrate seamlessly with the e-commerce frameworkdjango-oscar.Continuous integration status:Getting startedInstallationFrom PyPI:pip install django-oscar-easyrecor from Github:pip install git+git://github.com/snowball-one/django-oscar-easyrec.git#egg=django-oscar-easyrecAdd'easyrec'toINSTALLED_APPS.You will also need to installInstructions for installing Easyrec can be found oneasyrec’s sourceforge wikiFull documentation is available atRead the Docs
Package: django-oscar-eurotaxes
This package manage taxes ondjango-oscar. The package is structured so that it can be used only with Oscar.Full documentationLicenseThe package is released under the New BSD license.SettingsYou must add‘eurotaxes.partner’toINSTALLED_APPS(replacing the equivalent Oscar app). This can be achieved using
Oscar’s get_core_apps function - e.g.:# settings.py...INSTALLED_APPS=['django.contrib.auth',...]fromoscarimportget_core_appsINSTALLED_APPS=INSTALLED_APPS+get_core_apps(['eurotaxes.catalogue','eurotaxes.dashboard','eurotaxes.dashboard.catalogue','eurotaxes.partner'])CommandsYou can use the commandoscar_populate_taxesto add all the European Taxes.
Package: django-oscar-eway
eWay Payment for OscarDisclaimer:The integration to the eWay API defined in this project isincompleteand
currently only provides theToken PaymentusingeWay’s Rapid 3.0 API. We
haven’t had the need or time to provide any other part(s) of the API, yet.
Contributions to extend the functionality are more than welcome.InstallationYou can installdjango-oscar-ewaydirectly from github by running:$ pip install django-oscar-ewayAfter you have successfully installed it, you should add the app to yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'eway',
)and provide the eWay-specific settings in yoursettings.py:EWAY_API_KEY = "YOUR API KEY"
EWAY_PASSWORD = "YOUR API PASSWORD"
EWAY_USE_SANDBOX = True
EWAY_CURRENCY = "AUD"To obtain access to their developer sandbox, head over to theirdeveloper
siteand create an account.Finally, you have to apply the migrations provided by the package to your
project’s database. These are necessary for logging of eWay communication
during the payment process and will make tracking down errors easier:$ ./sandbox/manage.py migrate ewayIntegrate eWay In The CheckoutThe simplest way to integrate your project’s checkout with eWay is to use theEwayPaymentDetailMixinto extend yourPaymentDetailView. All you need
to do is create a newPaymentDetailViewin your checkout app, import the
mixin and add it to the view class. It should now look similar to this:from oscar.apps.checkout.views import PaymentDetailsView as OscarPaymentDetailsView
from eway.rapid.mixins import EwayPaymentDetailMixin

class PaymentDetailsView(EwayPaymentDetailMixin, OscarPaymentDetailsView):
    template_name = 'checkout/payment_details.html'In addition to that you need to hook up the view that is called by the eWay
response redirect. A default URL can be defined by adding the following line to
your URL patterns:urlpatterns = patterns('',
    ...
    url(r'^checkout/eway/', include('eway.rapid.urls')),
    ...
)Now it’s time to try it out and see if it works :)Further DocumentationThis package is still in its early stages. We’ll try and provide more
documentation soon. Until then, feel free to raise an issue or ask questions
on thedjango-oscar mailing list.ContributingYour need more functionality, found a bug or simply want to help us make this
package better? Create a fork, make your changes and open a pull request. We’ll
be thankful for it!LicenseThe package is released under the new BSD license.Changelog0.2.0Add support for Oscar v0.7 and v0.8Add support for Django 1.7 when using Oscar 0.8. Earlier versions of Oscar
are not supported because Django 1.7 support is only available starting with
Oscar 0.8.0.1.1Add tests for migrations using PostgreSQL and MySQL databases on TravisAdd a fix for MySQL when renaming tables in migration0004which fails
if constraints on the foreign keys are not dropped before renaming them. This is
details in ticket #466 for South:http://south.aeracode.org/ticket/466Fix dependency with Oscar’sbasketapp in eway migration.Rename deprecated tables in migration due to PostgreSQL issue with uppercase
names.0.1.0Initial version of the project.
Package: django-oscar-invoices
Installation$pipinstalldjango-oscar-invoicesSetupAddoscar_invoicesto theINSTALLED_APPSvariable of your
project’ssettings.py.Sync the database usingpython manage.py migrate.Create instances ofLegalEntityandLegalEntityAddress.IntegrateInvoiceCreatorin your checkout process.By default, we generate only HTML invoice document and allow user to decide how to
generate PDF documents. You can integratepython-pdfkit,WeasyPrint,xhtml2pdf,reportlabor another library of your choice.Since documents contains sensitive data, we store them out of the media folder and
do not provide public access via URL. For this purpose, we use custom storage classoscar_invoices.storages.DocumentsStorage, invoice documents placed into the
nested foldersettings.OSCAR_INVOICES_UPLOAD_FOLDERand available for the admin users via
dashboard order list.You can find more information indocumentation.SandboxSandbox environment set up to automatically create invoices on checkout.
But for this, instances ofLegalEntityandLegalEntityAddressmust be created
(fromadminsite) before order placement.