Saravanan666/pypi-org huggingface dataset:
Package: django-cbvpatterns
Django-cbvpatterns==================A nicer version of `patterns()` for use with class based views. Inspiredlargely by Loic.What is this?-------------If you're a big fan of class based views in Django, you might often find yoururls.py starting to look a little cluttered. Something likefrom django.conf.urls import patterns, urlfrom ponies import viewsurlpatterns = patterns('',url(r'^$', views.Index.as_view(), name='index'),url(r'^ponies/$', views.PonyList.as_view(), name='pony-list'),url(r'^ponies/create/$', views.PonyCreate.as_view(), name='pony-create'),url(r'^ponies/(?P<pk>\d+)/$', views.PonyDetail.as_view(), name='pony-detail'),url(r'^ponies/(?P<pk>\d+)/edit/$', views.PonyUpdate.as_view(), name='pony-update'),)The shortcuts you can use in patterns are really functional-view specific. Thefunctional version looks much nicer:from django.conf.urls import patterns, urlurlpatterns = patterns('ponies.views',url(r'^$', 'index', name='index'),url(r'^ponies/$', 'pony_list', name='pony-list'),url(r'^ponies/create/$', 'pony_create', name='pony-create'),url(r'^ponies/(?P<pk>\d+)/$', 'pony_detail', name='pony-detail'),url(r'^ponies/(?P<pk>\d+)/edit/$', 'pony_update, name='pony-update'),)So we can now have a class based view version which has the same feel:from cbvpatterns import patterns, urlurlpatterns = patterns('ponies.views',url(r'^$', 'Index', name='index'),url(r'^ponies/$', 'PonyList', name='pony-list'),url(r'^ponies/create/$', 'PonyCreate', name='pony-create'),url(r'^ponies/(?P<pk>\d+)/$', 'PonyDetail', name='pony-detail'),url(r'^ponies/(?P<pk>\d+)/edit/$', 'PonyUpdate, name='pony-update'),)You can also pass in the actual view classes directly, rather than using thestrnig representation.Contributing------------Development takes place`on GitHub <http://github.com/mjtamlyn/django-cbvpatterns>`_; pull requests arewelcome. Run tests with `tox <http://tox.readthedocs.org/>`_.
Package: django-cc
django-ccDjango-cryptocurrencies web wallet for Bitcoin and other cryptocurrencies.Simple pluggable application inspired by django-bitcoin.Python 3FeaturesMulti-currencyCelery supportWithdraw and Deposite3 types of balances: balance, unconfirmed, holdedQuick startEdit Currency modelfromcc.modelsimportCurrencycurrency=Currency.objects.create(label='Bitcoin',ticker='BTC',api_url='http://root:toor@localhost:8332')Start celery worker$celeryworker-Atst.cel.appGet new addresses for wallets$celerycallcc.tasks.refill_addresses_queueNow you can create wallets, deposite and withdraw fundsfromcc.modelsimportWalletwallet=Wallet.objects.create(currency=currency)wallet.get_address()wallet.withdraw_to_address('mvEnyQ9b9iTA11QMHAwSVtHUrtD4CTfiDB',Decimal('0.01'))After creating a withdraw transaction you need to run$celerycallcc.tasks.process_withdraw_transactionsQuery for new deposite transactions:$cc.tasks.query_transactionsIf you want to catch event from bitcoind, but these calls options in bitcoin.conf filewalletnotify=~/env/bin/celery call cc.tasks.query_transaction --args='["BTC", "'%s'"]'
blocknotify=~/env/bin/celery call cc.tasks.query_transactions --args='["BTC"]'where "BTC" - ticker (short name) of the CurrencyTransactionsWhen you write applications that are working with money it is extremely important to use Database transactions. Currenly django-cc doesn't inclues any@transaction.atomic. You should do this by yourself.In my code I have a higher level wrapper with @transaction.atomic and to get wallets I'm always using select for update, likeWallet.objects.select_for_update().get(addresses=address)to get a lock over the Wallet.Supported crypto currenciesIn general django-cc should work with most Bitcoin forks. I've tested it against: Bitcoin, Litecoin, Zcash (not anonymous transactions), Dogecoin and Dash.When you are adding any otherCurrency, than Bitcoin, you should definemagicbyteanddustvalues. Use tables below to get the values.Magic bytesMagic bytes are used to verify withdraw addresses. They are different for each cryptocurrencyCCMainnetTestnetBitcoin0,5111,196Litecoin48,5058Zcash2829Dogecoin30,22Dash76,16140DustMinimal amount of valid transactionCCDust sizeBitcoin0.00005430Litecoin0.00054600TestingTests are written using Regtest. To run them you need docker and docker-compose. Simply rundocker-compose upand it will build and run all tests for you. Usually it takes about 5 min to run all the tests.
Package: django-ccfiletypes
Aboutccfiltypes is a small collection of template filters for django that
make the displaying of information from FileFields a little easier..It’s useful for displaying an icon for a certain filetype or getting
just the filename without the full path.Checkout thedocumentation.AttributionThe icons in this package come from theFree File Iconsproject byTeamboxand a copy of
the license can be found the ccfiletypes/static/ccfiletypes directory.
Package: django-ccgallery
ccgallery is a minimal gallery application for Django designed to showcase products, services or anything else that fits into the ‘category > thing’ model.ccgallery comes bundled withfancyBoxwhich is licensed under acreative commons attribution non-commercial license. If you plan on using this app within a commercial context, then you will need to either refrain from using thefancyBoxcomponent or pay alicense feefor commercial usage.
Package: django-ccnews
Aboutccnews is a lightweight news application.RequirementsDjango> 1.4Markdowndjango-ccfiletypesMarkdown and django-ccfiletypes will be automatically installed if you don’t already have them.For full info please refer to thedocumentation.Licenseccnews is released under a3 clause BSD license.ccnews comes bundled withfancyBoxwhich is licensed under acreative commons attribution non-commercial license. If you plan on using this app within a commercial context, then you will need to either refrain from using thefancyBoxcomponent or pay alicense feefor commercial usage.
Package: django-ccpages
Aboutccpages is a lightweight pages application.RequirementsDjango> 1.4mpttMarkdown2ccfiletypesMarkdown, django-mptt and ccfiletypes will be installed if you don’t already have them.Quick Installation InstructionsInstall ccpages:pip install django-ccpagesNext addccpages&MPTTto your installed apps:INSTALLED_APPS = (
     ...
    'ccpages',
    'mptt',
)ccpagesrequiresccfiletypesand django-writingfield these will be installed with pip. Make
sure thatccfiletypesis also in your installed apps. It only needs to be
once:INSTALLED_APPS = (
     ...
    'ccfiletypes',
    'writingfield',
)Wire it up to your root urls.py:urlpatterns += ('',
...
    ('^pages/', include('ccpages.urls', namespace='ccpages')),
)Then run syncdb:python manage.py syncdbFinally you’ll need to run the collectstatic command to get all of the static
files into your static root:python manage.py collectstaticFor full info please refer to thedocumentation.FeaturesPassword protected pagesPages can be password protected with a password. The password is stored in
plain text and this mechanism is not meant to store highly sensitive
information. It is merely intended to provide a means of allowing a group of
people access to content without having a dependancy on user authentication.Licenseccpages is released under a3 clause BSD license.
Package: django-ccthumbs
Aboutccthumbs is a fork ofdjango-thumbsthat makes generating thumbnails easy.RequirementsDjango> 1.3PILPIL will be automatically installed for you if it is not available.InstallationInstall via pip:pip install django-ccthumbsRefer to thedocumentationfor usage examples.SouthIfsouthis in your installed apps then an introspection rule will be made available to aid working with migrations.Licenseccthumbs is released under a3 clause BSD license.
Package: django-cd
django-cdContinuous deploymentInstallationgit clone git@github.com/ppinard/django-cd.git
cd django-cd
pip install -e .Django - settings.pyAdd toINSTALLED_APPS:INSTALLED_APPS=[..."django_bootstrap5","django_cd",]Add to settings.py:ACTIONS={"command":"django_cd.actions.CommandAction","git-checkout":"django_cd.actions.GitCheckoutAction","python-run":"django_cd.actions.PythonAction","python-pytest":"django_cd.actions.PythonPytestAction","python-venv":"django_cd.actions.PythonVirtualEnvAction",}TRIGGERS={"cron":"django_cd.triggers.CronTrigger",}NOTIFICATIONS={"email":"django_cd.notifications.EmailNotification",}JOBFILES=[]WORKDIR=""LicenseThe library is provided under the MIT license license.Copyright (c) 2021, Philippe Pinard
Package: django-cdc
============================django-cdc============================Tracking changes in django models and push it to logger/aws endpoints.Quickstart Guide===============================Install it with pip from PyPi::pip install django-cdcbefore installing djangoCDC, make sure that you have already run the following command oryour environment the following packages:pip install psycopg2pip install django-bitfieldpip install boto3pip install pyyamlpip install django-extensionspip install confluent-kafkaAdd ``django_cdc`` to your ``INSTALLED_APPS``::INSTALLED_APPS = ('django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','django_extensions','django_cdc',)If you want to track full model changes, then you need to attach an ``DjangoCDC`` manager to the model.For foreign key attributes, we need to pass kwargs foreign of dict type and partition_key is only used with kafka::from django.db import modelsfrom django_cdc.models.managers import DjangoCDCfrom django_cdc.models.constants import ServiceTypeclass ProductCategory(models.Model):name = models.CharField(max_length=150, primary_key = True)description = models.TextField()django_cdc = DjangoCDC(services=[ServiceType.SNS], partition_key=name,service_custom_name= {ServiceType.ASYNC_KAFKA_PRODUCER : ''})class Product(models.Model):name = models.CharField(max_length = 150)description = models.TextField()price = models.DecimalField(max_digits = 10, decimal_places = 2)productcategory = models.ForeignKey(ProductCategory)django_cdc = DjangoCDC(foreign_keys={'productcategory':['name','description']},services=[ServiceType.SNS,ServiceType.KINESIS],service_custom_name= {ServiceType.SNS: '' , ServiceType.KINESIS: ''})ServiceType is used for specifying on which you want to publish and service_custom_name is usedto specify own custom name for resource- KAFKA, SNS, KINESIS. Let us say,if you want to publishdata to kafka topic like ProductCategory in that case you need to pass service_custom_name as anargument with the custom name as shown above. Also if "None" value is set for theservice_custom_name then it will publish to the topic derived e.g. <SERVICE_FUNCTION_PREFIX>-<tableName>.Run the following commmand to deploy lambda function that pushes data to kinesis:python manage.py setserviceBy default warn, error, critical logging level are enabled.To enable info logging:python manage.py setservice --logging_level=infoTo enable debugging:python manage.py setservice --logging_level=debugFollowing fields handled for json serialization:BitHandlerdatetimetimeImageFieldFile
Package: django-celery-admin
This app adds the ability to manually run a periodic celery task from the Django Admin.  It requires *Django 1.3+* and[ask/django-celery](http://github.com/ask/django-celery).This app was forked from and inspired by [erussell/django-redis-status](http://github.com/erussell/django-redis-status).Installation---------Put ``celery_admin`` in your ``INSTALLED_APPS``.That's all. Only admin-users with ``superuser`` permission can see these stats.
Package: django-celery-beat-rest
django-celery-beat RESTful APIRESTful API for django-celery-beat.UsageAddcelery_beat_restin your project'ssettings.py:INSTALLED_APPS = [
    'celery_beat_rest',
]Includecelery_beat_rest.urlsin project'surls.py:urlpatterns = [
    path('celery/beat/', include('celery_beat_rest.urls'))
]
Package: django-celery-email-with-retry
ADjangoemail backend that uses aCeleryqueue for out-of-band sending
of the messages.This fork reinstates the retry logic that stops retrying afterTask.max_retriesattempts,
where the default is3.Using django-celery-emailTo enabledjango-celery-emailfor your project you need to adddjcelery_emailtoINSTALLED_APPS:INSTALLED_APPS += ("djcelery_email",)You must then setdjango-celery-emailas yourEMAIL_BACKEND:EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'By defaultdjango-celery-emailwill use Django’s builtinSMTPemail backend
for the actual sending of the mail. If you’d like to use another backend, you
may set it inCELERY_EMAIL_BACKENDjust like you would normally have setEMAIL_BACKENDbefore you were using Celery. In fact, the normal installation
procedure will most likely be to get your email working using only Django, then
changeEMAIL_BACKENDtoCELERY_EMAIL_BACKEND, and then add the newEMAIL_BACKENDsetting from above.If you need to set any of the settings (attributes) you’d normally be able to set on aCelery Taskclass had you written it yourself, you may specify them in adictin theCELERY_EMAIL_TASK_CONFIGsetting:CELERY_EMAIL_TASK_CONFIG = {
    'queue' : 'email',
    'rate_limit' : '50/m',
    ...
}There are some default settings. Unless you specify otherwise, the equivalent of the
following settings will apply:CELERY_EMAIL_TASK_CONFIG = {
    'name': 'djcelery_email_send',
    'ignore_result': True,
}After this setup is complete, and you have a working Celery install, sending
email will work exactly like it did before, except that the sending will be
handled by your Celery workers:from django.core import mail

emails = (
    ('Hey Man', "I'm The Dude! So that's what you call me.", 'dude@aol.com', ['mr@lebowski.com']),
    ('Dammit Walter', "Let's go bowlin'.", 'dude@aol.com', ['wsobchak@vfw.org']),
)
results = mail.send_mass_mail(emails)resultswill be a list of celeryAsyncResultobjects that you may ignore, or use to check the
status of the email delivery task, or even wait for it to complete if want. You have to enable a result
backend and setignore_resulttoFalseinCELERY_EMAIL_TASK_CONFIGif you want to use these.
See theCelery docsfor more info.len(results)will be the number of emails you attempted to send, and is in no way a reflection on the success or failure
of their delivery.Changelog1.0.3 - 2012.03.06Backend will now pass any kwargs with which it is initialized to the
email sending backend.Thanks toFedor Tyurinfor the contribution.1.0.2 - 2012.02.21Task and backend now accept kwargs that can be used in signal handlers.Task now returns the result from the email sending backend.Thanks toYehonatan Danivfor these changes.1.0.1 - 2011.10.06Fixed a bug that resulted in tasks that were throwing errors reporting success.If there is an exception thrown by the sending email backend, the result of the task will
now be this exception.
Package: django-celery-extensions
========================
Django Celery Extensions.. image::https://img.shields.io/pypi/v/django-celery-extensions.svg:target:https://pypi.python.org/pypi/django-celery-extensions.. image::https://img.shields.io/travis/druids/django-celery-extensions.svg:target:https://travis-ci.org/druids/django-celery-extensions.. image::https://readthedocs.org/projects/django-celery-extensions/badge/?version=latest:target:https://django-celery-extensions.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image::https://coveralls.io/repos/github/druids/django-celery-extensions/badge.svg?branch=master:target:https://coveralls.io/github/druids/django-celery-extensions?branch=master:alt: Code coverageGeneral purpose celery extensions library for Django.Free software: MIT licenseDocumentation:https://django-celery-extensions.readthedocs.io.Supported Python versions: 3.6, 3.7, 3.8Supported Django versions: 2.2FeaturesEasy integration into projectRun celery via DjangoUnique running instance of celery beaterUnique task run
Package: django-celery-growthmonitor
Django-Celery-GrowthMonitorA Django helper to monitor jobs running Celery tasksFeaturesUtilities to track progress of Celery tasks via in-database jobsDesigned for jobs with user-uploaded filesRequirementsPython>= 3.5Django>= 2.2Celery>= 4.0.2echoices>= 2.6.0autoslug>=
1.9.7InstallationUsing PyPIRunpip installdjango-celery-growthmonitorUsing the source codeMake surepandocis installedRun./pypi_packager.shRunpip installdist/django_celery_growthmonitor-x.y.z-[...].wheel,
wherex.y.zmust be replaced by the actual version number and[...]depends on your packaging configurationUsage('state', echoices.fields.make_echoicefield(default=celery_growthmonitor.models.AJob.EState.CREATED, echoices=celery_growthmonitor.models.AJob.EState, editable=False)),
('status', echoices.fields.make_echoicefield(default=celery_growthmonitor.models.AJob.EStatus.ACTIVE, echoices=celery_growthmonitor.models.AJob.EStatus, editable=False)),from .celery import app

@app.task
def my_task(holder: JobHolder, *args):
    job = holder.get_job()
    if job.has_failed():
        # Just skip the whole if the previous task failed
        return holder.pre_serialization()
    # Some processing
    ...
    job.save()
    return holder.pre_serialization()HelpersAutomatically set the job failed on task failure using custom base Task
classfrom celery_growthmonitor.models.task import JobFailedOnFailureTask

@app.task(base=JobFailedOnFailureTask, bind=True)
def my_task(self, holder: JobHolder):
    passAdminfrom django.contrib import admin

from celery_growthmonitor.admin import AJobAdmin

@admin.register(MyJob)
class MyJobAdmin(AJobAdmin):
    fields = AJobAdmin.fields + ('my_extra_field',)
    readonly_fields = AJobAdmin.readonly_fields + ('my_extra_field',)
Package: django-celery-heartbeat
Celery Heartbeat
===Django app that provides a task that can be run periodically to hit a webhook url of choice to provide basic celery health monitoring.Configuration
—Addcelery_heartbeatto yourINSTALLED_APPSsetting:INSTALLED_APPS = [
    ...
    celery_heartbeat,
]Celery-heartbeat comes with a request handler that posts to a configured endpoint and sends a token to authenticate with the receiving server:CELERY_HEARTBEAT_ENDPOINT = 'https://example.com/celery-webhook/
CELERY_HEARTBEAT_TOKEN = '<valid token for endpoint request>'You will also need to configure the heartbeat task to run periodically using celery-beat:CELERY_BEAT_SCHEDULE = {
    'celery-heartbeat': {
        'task': 'celery_heartbeat.tasks.send_heartbeat',
        'schedule': crontab(minute='*/5')
    }
}
Package: django-celery-inspect
# django-celery-inspectDjango reusable-app that uses Celery Inspect command to monitor workers via the [Django REST Framework](https://github.com/tomchristie/django-rest-framework).The main idea is to be able to monitor celery workers from another external service or server via a REST API and figure out if they are running or not by using celery's own [Inspect API](http://docs.celeryproject.org/en/latest/userguide/workers.html#inspecting-workers).## Quick start1. Install:pip install django-celery-inspect2. Add "celery_inspect" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [...'celery_inspect',]3. Add the following to your urls.py:url(r'^api/v1/celery-inspect/', include('celery_inspect.urls', namespace='celery_inspect')),4. If you Desire to use DRF's Authentication to protect these endpoints (Optional).REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication',),'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),}## Usage:1. http://localhost:8000/api/v1/celery-inspect/ping/{"worker2@localhost:8000": {"ok": "pong"},"worker1@localhost:8000": {"ok": "pong"}}2. http://localhost:8000/api/v1/celery-inspect/active/{"worker2@localhost:8000": [],"worker1@localhost:8000": []}3. http://localhost:8000/api/v1/celery-inspect/registered/{"worker2@localhost:8000": ["core.tasks.db_backup","core.tasks.send_queued_emails","yy.tasks.assign_to_mongo","xx.tasks.check_for_new_registered","xx.tasks.create_and_associate_manager","qq.celery.debug_task"],"worker1@localhost:8000": ["core.tasks.db_backup","core.tasks.send_queued_emails","yy.tasks.assign_to_mongo","xx.tasks.check_for_new_registered","xx.tasks.create_and_associate_manager","qq.celery.debug_task"]}4. http://localhost:8000/api/v1/celery-inspect/scheduled/{"worker2@localhost:8000": [],"worker1@localhost:8000": []}### If for some reason you can only deal with status codes (This feature will only work if you have django-celery installed)1. http://localhost:8000/api/v1/celery-inspect/active-status/- Returns 200 if all workers in WorkerState are up.- Returns 404 if workers are down (WorkerState != then inspect()).- Returns 501 if djcelery a.k.a django-celery is not installed.
Package: django-celery-lite
Django Celery Lite - Lite version for Django CeleryDjango Celery Lite is celery ingration Django just only commandTest Support Django >= 2.2.xInstallationPython packagepip install django-celery-liteAdd 'djcelerylite' to INSTALLED_APPS:'djcelerylite',UsageProgramReplace withcelerypython manage.py celerycelery workerpython manage.py celery worker
Package: django-celery-model
django-celery-modelis an
extension toCelerywhich adds support
for tracking Celery tasks assigned to Django model instances.InstallationInstall the latest version from pypi.python.org:pip install django-celery-modelInstall the development version by cloning the source from github.com:pip install git+https://github.com/mback2k/django-celery-model.gitConfigurationAdd the package to yourINSTALLED_APPS:INSTALLED_APPS += (
    'djcelery_model',
)Make sure that you are receiving Celery events via:CELERY_TASK_TRACK_STARTED = True
CELERY_TASK_SEND_SENT_EVENT = True
CELERY_SEND_EVENTS = TrueExampleAdd the TaskMixin to your Django model:from django.db import models
from django.utils.translation import ugettext_lazy as _
from djcelery_model.models import TaskMixin

class MyModel(TaskMixin, models.Model):
    name = models.CharField(_('Name'), max_length=100)Queue an asynchronous task from your Django model instance:from .models import MyModel
from .tasks import mytask

mymodel = MyModel.objects.get(name='test instance')
mymodel.apply_async(mytask, ...)Retrieve list of asynchronous tasks assigned to your Django model instance:mymodel.tasks.all()
mymodel.tasks.pending()
mymodel.tasks.started()
mymodel.tasks.retrying()
mymodel.tasks.failed()
mymodel.tasks.successful()
mymodel.tasks.running()
mymodel.tasks.ready()Check for a running or ready asynchronous task for your Django model instance:mymodel.has_running_task
mymodel.has_ready_taskHandle asynchronous task results for your Django model instance:mymodel.get_task_results()
mymodel.get_task_result(task_id)
mymodel.clear_task_results()
mymodel.clear_task_result(task_id)Filter your Django model based upon asynchronous tasks:MyModel.objects.with_tasks()
MyModel.objects.with_pending_tasks()
MyModel.objects.with_started_tasks()
MyModel.objects.with_retrying_tasks()
MyModel.objects.with_failed_tasks()
MyModel.objects.with_successful_tasks()
MyModel.objects.with_running_tasks()
MyModel.objects.with_ready_tasks()

MyModel.objects.without_tasks()
MyModel.objects.without_pending_tasks()
MyModel.objects.without_started_tasks()
MyModel.objects.without_retrying_tasks()
MyModel.objects.without_failed_tasks()
MyModel.objects.without_successful_tasks()
MyModel.objects.without_running_tasks()
MyModel.objects.without_ready_tasks()LicenseReleased under MIT LicenseCopyright (c) 2014-2019 Marc Hoerskeninfo@marc-hoersken.de