Saravanan666/pypi-org huggingface dataset:
Package: django-tastypie-sepomex
Little django application that exposes the sepomex database in a RESTful way.Installation$ pip install django-tastypie-sepomexConfigurationOnce installed, you must addsepomexto yourINSTALLED_APPSINSTALLED_APPS += ['sepomex']Apply migrate command to add the sepomex models to your database.$ python manage.py migrate sepomexThe sepomex data is provided in a file calledsepomex-data.tar.gz, you need to extract the content.$ tar xvf sepomex-data.tar.gzPopulate your sepomex models$ python manage.py loadsepomexThis command will call theloadmxstatesandloadmxmunicipalitiescommands. It finally will fill thesepomex_mxasentamientotable to complete the process.Run your server$ python manage.py runserver… and use the endpoints providedGet the list of statesThere are 32 states, so we pass that as a query string.$ curl localhost:8000/api/v1/mxestado/?limit=32List first 20 municipalities for CoahuilaCoahuila’s id is 5. If not specified, the limit objects per query is 20$ curl localhost:8000/api/v1/mxmunicipio/?mx_estado__id=5Activate sepomex loggerExample ofLOGGINGdict insettings.py. You might have more loggers.LOGGING = {
    'version': 1.0,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler'
        }
    },
    'loggers': {
        'sepomex': {
            'handlers': ['console'],
            'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
        },
        # Your loggers here
    }
}
Package: django-tastypie-simple-api-doc
A Django app to generate a simple and automatic api documentation with Tastypie.Installationpip install django-tastypie-simple-api-docUsageFirst, add this to installed app and django_markup (we use this package to format classes docstrings).INSTALLED_APPS = (
        'tastypie_api_doc',
        'django_markup',
)Then you need to tell me where is your Tastypie Api object that will be documented. Put it’s path insettings.pylike this:API_OBJECT_LOCATION = "app.module.object_name"In my test project was like this:API_OBJECT_LOCATION = "project.urls.v1_api"Got it? Now go to your urls module and goes like this:from tastypie_api_doc.views import build_doc

urlpatterns = [
  ...
  url(r'^choose_your_url', build_doc),
]And….We are almost there. Now, you need to “collect your static” if you know what I mean. :Ppython manage.py collectstaticAnd this is it. :)This is a work in progress but it can be already used in your projects. So, stay tuned. Feel free to contribute to get this app way more better. =D
Package: django-tastypie-sorl-thumbnail
Add asorl-thumbnailsupport for a Django Tastypie.InstallationInstall package viapippip install django-tastypie-sorl-thumbnailUsagefrom tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from tastypie.resources import ModelResource
from tastypie_sorl_thumbnail.fields import ThumbnailField

from .models import Photo


class PhotoResource(ModelResource):
    thumbnail = ThumbnailField('photo', '120', quality=80)

    class Meta(object):
        queryset = Photo.objects.all()
        resource_name = 'photo'
        authentication = Authentication()
        authorization = Authorization()LoggingConfiguretastypie-sorl-thumbnaillogger.Testing$ python setup.py testor$ python manage.py test tastypie_sorl_thumbnail
Package: django-tastypie-with-uploads-dummycache-error500
Creating delicious APIs for Django apps since 2010.Currently in beta (v1.0.0-beta) but being used actively in production on several
sites.Differences between this patched version and Django TastypieThis version includes three patches that have been submitted as pull requests
to the creators of Django Tastypie:6bf187d > if an Error 500 occurs, the message of the exception is shown in
the error description, instead of a generic ‘This request could not be
processed’.18d7a90 > when using Django’s DummyCache, CacheThrottle does not fail1fbc0a8 > allows file uploads (attachments) on POST requestsOnce these patches are included in the source repository, this fork will not
be required anymore.RequirementsRequiredPython 2.5+Django 1.2+ (May work on Django 1.1)mimeparse 0.1.3+ (http://code.google.com/p/mimeparse/)Older versions will work, but their behavior on JSON/JSONP is a touch wonky.dateutil (http://labix.org/python-dateutil) >= 1.5, < 2.0Optionalpython_digest (https://bitbucket.org/akoha/python-digest/)lxml (http://codespeak.net/lxml/) if using the XML serializerpyyaml (http://pyyaml.org/) if using the YAML serializerbiplist (http://explorapp.com/biplist/) if using the binary plist serializerWhat’s It Look Like?A basic example looks like:# myapp/api.py
# ============
from tastypie.resources import ModelResource
from myapp.models import Entry


class EntryResource(ModelResource):
    class Meta:
        queryset = Entry.objects.all()


# urls.py
# =======
from django.conf.urls.defaults import *
from tastypie.api import Api
from myapp.api import EntryResource

v1_api = Api(api_name='v1')
v1_api.register(EntryResource())

urlpatterns = patterns('',
    # The normal jazz here then...
    (r'^api/', include(v1_api.urls)),
)That gets you a fully working, read-write API for theEntrymodel that
supports all CRUD operations in a RESTful way. JSON/XML/YAML support is already
there, and it’s easy to add related data/authentication/caching.You can find more in the documentation athttp://django-tastypie.readthedocs.org/.Why tastypie?There are other, better known API frameworks out there for Django. You need to
assess the options available and decide for yourself. That said, here are some
common reasons for tastypie.You need an API that is RESTful and uses HTTP well.You want to support deep relations.You DON’T want to have to write your own serializer to make the output right.You want an API framework that has little magic, very flexible and maps well to
the problem domain.You want/need XML serialization that is treated equally to JSON (and YAML is
there too).You want to support my perceived NIH syndrome, which is less about NIH and more
about trying to help out friends/coworkers.Reference Materialhttp://github.com/toastdriven/django-tastypie/tree/master/tests/basicshows
basic usage of tastypiehttp://en.wikipedia.org/wiki/RESThttp://en.wikipedia.org/wiki/List_of_HTTP_status_codeshttp://www.ietf.org/rfc/rfc2616.txthttp://jacobian.org/writing/rest-worst-practices/author:Daniel Lindsleydate:2011/09/16
Package: django-tawea
# django-taweaAdd Facebook chat ([Tawea][1]) to a template with a simple tag.{% tawea color='#CC2700' %}## InstallationUsing `pip`:$ pip install django-taweaOr cloning the project from github:$ git clone git@javimb/django-tawea.git$ cd django-tawea$ pip install -r requirements.txt## UsageAdd `tawea` to `INSTALLED_APPS`:INSTALLED_APPS = (...'tawea',...)Load and use the provided `tawea` tag in the template:{% load tawea %}{% tawea [color=<hex_color>] %}Django-tawea provides all the JavaScript stuff for Tawea's chat, so put the `tawea` tag at the end of the template.### Optional args- **color:** The hex color used in the chat. #3b5998 by default.##Example{% load tawea %}{% block js %}{% tawea color='#CC2700' %}{% endblock js %}[1]: https://tawea.com/
Package: django-tawkto
django-tawktodjango-tawkto is a simple Django app to it integrates withhttps://www.tawk.to/chat.RequirementsPython 3.7 to 3.10 supported.Django 2.2 to 4.0 supported.Quick startInstall the stable release from pypi (using pip):pipinstalldjango-tawktoAddtawktoto your INSTALLED_APPS setting like this:INSTALLED_APPS=[...'tawkto',]AddTAWKTO_ID_SITEin settings.py:TAWKTO_ID_SITE='<tawkto id site>'(Optional) AddTAWKTO_API_KEY:TAWKTO_API_KEY='<tawkto api key>'(Optional) For secure site (requiresTAWKTO_API_KEY):TAWKTO_IS_SECURE=TrueIn HTML:{% load tawkto_tags %}

<!DOCTYPE html>
<html lang="en">
<head>
    ...
</head>
<body>
    ...
    {% tawkto_script %}
</body>
</html>(Optional) Add visitornameandemail:{% tawkto_script user_name=request.user.get_full_name user_email=request.user.email %}(Optional) Use a different widget for a given property (defaultis the default value):TAWKTO_WIDGET_ID="default"or{% tawkto_script widget_id='somewidgetid' %}(Optional) Use a different tawkto property:{% tawkto_script id_site='tawktosideit' api_key='tawktoapikey'%}(Optional) If you want to hide the chat for superuser (default isTrue):TAWKTO_EXCLUDE_SUPERUSERS=True(Optional) Set custom metadata regarding this chat/visitor:is_securemust beTrue.You must provide a valid email.Metadata is represented by key and value.The key is of the string data type and can contain only alphanumeric characters and ‘-‘ (dash).More inhttps://developer.tawk.to/jsapi/setAttributessection.# view.pydefview(request):context={'metadata':{'attr-1':'value1','attr-2':'value2'}}returnrender(request,'template.html',context)In template:{% tawkto_script is_secure=True user_email=example@example.com extra_attributes=metadata %}
Package: django_taxbot
=============Django Taxbot=============This application attempts to make a little bit of sense out of the mess that is the tax landscape.It uses a saved (and regularly updated and expanding) dictionary of aggregated taxes to figure out payable taxes based on a set of passed in values.It bears noting that I have created this for my own use and while I intend to update is regularly, the accuracy of these values must be verified by the developer prior to use.While I wait for a suitable API for tax aggregates, I have compiled my own list and based this application on that list.Presently, this application only handled taxes in Canada, parts of the US, in Great Britain and in Nigeria.-----------Quick Start-----------1. Install easily with pip:.. code :: pythonpip install django_taxbot2. Add to your installed apps:.. code :: pythonINSTALLED_APPS = (...'taxbot',...)3. Import the TaxClient object in your projects and use as shown-----------------Detailed Overview-----------------This section details the way the application can be used.To create a new ``TaxClient``, simply import and use like so:.. code :: pythonfrom taxbot import TaxClientclient = TaxClient()And just like that, we now have a new TaxClient. This client is initialized as Sales Tax client by default. To get Meal tax instead, pass in the ``M`` flag when initializing the client... code :: pythonclient = TaxClient('M')Now we'll go over the methods available to the client.tax_known(self, country, [region, city])----------------------------------------This method returns a Boolean value which informs us if the tax for the location is known or not.It is recommended that this method is called before any actions involving tax rates. Pass in as much information as possible to get the best results from this client.The method expects the country to be in ISO-ALPHA-2 codes. See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. Region codes are 2 character alphas also and cities can be spelled out.For countries with simple tax structures (Great Britain and Nigeria for now), the region and the city may be ignored.get_tax(self, country, [region, city])--------------------------------------Same as above, this method takes in 3 parameters.It calls on the ``tax_known`` method and so it is not necessary to call to the former beforehand.This method returns the tax as a Decimal or in instances where tax structure is more complicated, returns a dictionary of applicable taxes.** Important ** Please check the type of return values from this method before using them.calculate_tax(self, amount, country, [region, city])----------------------------------------------------In addition to the parameters above, this method accepts the value on which the tax is to be calculated and returns a dictionary of all calculated taxes.create_tax(self, amount, country [region, city])------------------------------------------------In addition to the above, this method will create a ``Tax`` (and a ``CanadianTax``)object where the tax is known. Please refer to the code base in the app repository to view the fields available on the respective objectsCheers
Package: django-taylogger-middleware
Taylogger Django Middleware is a middleware that helps
catch Django exceptions and send them to Taylogger to save the
log message of the exception.
Quick start
———–Add “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'taylogger',
]Add “polls” to your MIDDLEWARES setting like this:MIDDLEWARES = [
    ...
    'taylogger.middleware.ErrorLoggerMiddleware',
]Then set the following variables in the settings.py`python EXCEPTION_GROUP_ID = "YOUR_EXCEPTION_GROUP_ID" TAYLOGGER_API_KEY = "YOUR_TAYLOGGER_API_KEY" `4. You can now use your app and Taylogger Middleware will catch
your exceptions and send to Taylogger app
Package: django-tbase-config
django-expand/tbase_config基本的配置安装pipinstalldjango-tbase-config# settings.pyINSTALLED_APPS=[# 个人应用# 基本配置'tbase_config','solo',]Getting StartedDownload links:SSH clone URL: ssh://git@git.jetbrains.space/terrychanorg/django-expand/tbase_config.gitHTTPS clone URL:https://git.jetbrains.space/terrychanorg/django-expand/tbase_config.gitThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesWhat things you need to install the software and how to install them.ExamplesDeploymentAdd additional notes about how to deploy this on a production system.ResourcesAdd links to external resources for this project, such as CI server, bug tracker, etc.
Package: django-tbase-page
django-expand/tbase_page基本页面安装pipinstalldjango-tbase-page# settings.pyINSTALLED_APPS=[# 个人应用# 基本配置'tbase_page','tbase_config','tbase_theme_tailwind',#'tbase_post',# 'markdownx''martor',#'taggit',]Getting StartedDownload links:SSH clone URL: ssh://git@git.jetbrains.space/terrychanorg/django-expand/tbase_page.gitHTTPS clone URL:https://git.jetbrains.space/terrychanorg/django-expand/tbase_page.gitThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesWhat things you need to install the software and how to install them.ExamplesDeploymentAdd additional notes about how to deploy this on a production system.ResourcesAdd links to external resources for this project, such as CI server, bug tracker, etc.
Package: django-tbase-post
django-expand/tbase_post基本的文本模块安装pipinstalldjango-tbase-post# settings.pyINSTALLED_APPS=[# 个人应用# 基本配置# 'tbase_page','tbase_config','tbase_theme_tailwind','tbase_post',# 'markdownx''martor','taggit',]Getting StartedDownload links:SSH clone URL: ssh://git@git.jetbrains.space/terrychanorg/django-expand/tbase_post.gitHTTPS clone URL:https://git.jetbrains.space/terrychanorg/django-expand/tbase_post.gitThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesWhat things you need to install the software and how to install them.ExamplesDeploymentAdd additional notes about how to deploy this on a production system.ResourcesAdd links to external resources for this project, such as CI server, bug tracker, etc.
Package: django-tbase-post-product
django-expand/tbase_post_product用于产品的文章模块安装pipinstalldjango-tbase-post-product# settings.pyINSTALLED_APPS=[# 个人应用# 基本配置# 'tbase_page','tbase_config','tbase_theme_tailwind','tbase_post',# 'markdownx''martor','taggit',]更新2024/02/26
添加低频率链接推荐
修改缓存时间
修改展示链接数目2023/12/22
添加热门链接2023/12/02
添加发布状态字段2023/07/07
加入更新时间,排序默认使用更新时间2023/06/05
优化相关内容查询,模板文件,针对tags内容数目低于10的链接添加nofollow。2023/06/02
加入seo优化，对tags内容过少（小于10）的页面添加noindexGetting StartedDownload links:SSH clone URL: ssh://git@git.jetbrains.space/terrychanorg/django-expand/tbase_post_product.gitHTTPS clone URL:https://git.jetbrains.space/terrychanorg/django-expand/tbase_post_product.gitThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesWhat things you need to install the software and how to install them.ExamplesDeploymentAdd additional notes about how to deploy this on a production system.ResourcesAdd links to external resources for this project, such as CI server, bug tracker, etc.
Package: django-tbase-theme-tailwind
django-expand/tbase_theme_tailwind集成tailwind集成在自己的模板文件中引用即可
安装pipinstalldjango-tbase-theme-tailwind# settings.pyINSTALLED_APPS=[# 个人应用# 基本配置# 'tbase_page','tbase_config','tbase_theme_tailwind','tbase_post',# 'markdownx''martor','taggit',]Getting StartedDownload links:SSH clone URL: ssh://git@git.jetbrains.space/terrychanorg/django-expand/tbase_theme_tailwind.gitHTTPS clone URL:https://git.jetbrains.space/terrychanorg/django-expand/tbase_theme_tailwind.gitThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesWhat things you need to install the software and how to install them.ExamplesDeploymentAdd additional notes about how to deploy this on a production system.ResourcesAdd links to external resources for this project, such as CI server, bug tracker, etc.
Package: django-tbot-base
django-tbot-baseDjango Telegram bot base configInstallation:pipinstalldjango-tbot-baseSetting upYourProject/settings.py# Application definitionINSTALLED_APPS=['tbot_base',...]# Add your bot handlers in order of priorityBOT_HANDLERS=['tbot.handlers',]YourProject/urls.pyfromdjango.contribimportadminfromdjango.urlsimportpath,includeurlpatterns=[path('admin/',admin.site.urls),path('',include('tbot_base.urls')),# include webhook url]pythonmanage.pymakemigrationstbot_base
pythonmanage.pymigrateUsageHandlersYourProject/tbot/handlers.pyfromtelebotimporttypesfromtelebot.apihelperimportApiTelegramExceptionfromtbot_base.botimporttbot@tbot.message_handler(func=lambdamessage:True)deftext_messages(message:types.Message):tbot.send_message(message.from_user.id,'Hello!')@tbot.callback_query_handler(func=lambdacall:True)defcallback_inline(call:types.CallbackQuery):tbot.send_message(call.from_user.id,'Hello!')# remove the "clock" on the inline buttontry:tbot.answer_callback_query(callback_query_id=call.id,text='')exceptApiTelegramException:pass
Package: django-tbot-mailing
django-tbot-mailingУстановкаpip install django-tbot-mailingНастройкаВsettings.py...INSTALLED_APPS=[...,'tbot_base''tbot_mailing']BOT_HANDLERS=[# для tbot_base'tbot.dispatcher',]MAILING_USERMODEL='tbot.User'# укажите модель пользователяfrom.celeryimportappCELERY_BROKER_URL='redis://localhost:6379'CELERY_APP=app# приложение celery созданное в celery.py проектаMEDIA_ROOT='media/'Необходимые для работы модуля опции -MAILING_USERMODELиCELERY_APP.В модели пользователя, указанной вMAILING_USERMODELдолжно присутствовать полеuser_idТакже, для корректного сохранения изображений рассылки укажитеMEDIA_ROOTДалее, выполняем миграции./manage.py makemigrations && ./manage.py migrateНе забудьте запустить celerycelery -A proj worker -EИспользованиеСоздать и запланировать рассылку вы можете в админ-панели
Package: django-tcb-blog
Blogging made easySettingsThese should go into your settings.py file.TCB_BLOG_SETTINGS={'RSS_FEED_TITLE':'Title of the blog','RSS_FEED_LINK':'/blog/','RSS_FEED_ITEM_DESC_TEMPLATE':'feed/entries.html'}Quick startAdd “blog” to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'blog',]Include the polls URLconf in your project urls.py like thispath('blog_api/',include('blog.urls')),Setup a module named ‘backend’Using celery.py.sample as a guide, setup celery do that tasks will workRunpython manage.py migrateto create the blog models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/blog_api/to see something.
Package: djangotcha
# DJANGOTCHAAPI Benchmark Tool for Django### Setting up```pip install djangotcha```add gotcha url to your urls.py```urlpatterns = [...url(r'^admin/', include('djangotcha.urls')),...]```and then add it to your installed apps:```INSTALLED_APPS = (...'djangotcha',...)```Add necessary Gotcha keys to settings.py of the django project:```GOTCHA_APPLICATION_ID = ''GOTCHA_TOKEN = ''```
Package: django-tckn-field
Django TCKN FieldA Django app built to integrate Republic of Turkey Identification Number to your project.Installationpipinstalldjango-tckn-fieldQuick Startfromtckn.fieldsimportTCKNFieldclassMyModel(models.Model):tckn_field=TCKNField()How Numbers Are ValidatedTCKNField inherits CharField, so it must be a string. Identification numbers are created by following these rules:The number must be 11 characters longThe number mustn't start with 0The tenth character is created with this formula:The eleventh character is created with this formula:LicenseYou can use this program under the terms of MIT License. See LICENSE for details.
Package: django-tcms
DjangotCMSan easy to setup CMS that integrates easily with django-admin.This project was brought to life by Matías Aguirre while hacking a CMS framework
forMydecowhile working onInsophia.DescriptionSites with custom CMS systems usually relies on deployment to bring new pages
layouts, and these new pages are created by us, developers.tCMSbrings a new
mechanism where new pages definitions can be defined using our favorite tool,python. With a set of building blocks pages are created easily once it’s
structure is well defined.FeaturesUsepythonto define your pages.Django-admin integration.Rich editing usingCKEditor(users need to installCKEditorand define
setting fortCMSapp).Pages i18n, check Localization section for more details.Easy template integration, an easy {{ cms.block_name }} includes named block.DependenciesThis application only depends on django-admin.InstallationFrompypi:$ pip install django-tcmsor:$ easy_install django-tcmsor clone fromgithub:$ git clone git://github.com/omab/django-tcms.gitand addtCMSto PYTHONPATH:$ export PYTHONPATH=$PYTHONPATH:$(pwd)/tcms/or:$ cd tcms
$ sudo python setup.py installConfigurationAddtCMSto installed applications:INSTALLED_APPS = (
    ...
    'tcms',
)Define where your pages are defined:TCMS_PAGES = 'tcms_pages'The application will import the modules inside and inspect anything that
has aPAGEvariable defined.Define where images should be uploaded:TCMS_IMAGES_UPLOAD_TO = 'cms/image/%Y/%m/%d'This setting is used to populate aupload_toDjango field parameter, so
you can use any supported formats.Define this setting if you haveCKEditorinstalled and want it to be used
while editing content:TCMS_CKEDITOR_BASE_URL = '/media/js/ckeditor'The application uses Django cache to store content to speed up loading the
content when serving the content to users, by default the cache name istcms, but you can override it by defining:TCMS_CACHE_NAME = '...'To enable page localizations, set this setting toTrue:TCMS_LOCALIZED = TrueLocalization is disabled by default.Define your settings with the extra name/values needed by your templates:RENDER_EXTRA_CONTEXT = {...}LocalizationIf your site support multiple languages, you will want to create pages on every
language.tCMSuses Django LANGUAGES when searching for supported languages, but allows
you to create global language pages, for example if you supporten-gbanden-uslocales, it’s possible to define a page with localeenand it
will be used to server the same content for users requesting for one or other
locale.Example proyectCheck theexampleto see how it works.
Package: django-tctip
django-tctip一个 Django 应用，用来在页面显示打赏弹框，效果可看我博客https://tendcode.com/step 1
安裝包pipinstalldjango-tctipstep 2
配置中添加应用INSTALLED_APPS=['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','django_tctip',]step 3
生成数据表pythonmanage.pymakemigrations
pythonmanage.pymigratestep 4
在需要展示的页面添加引入标签函数{% load tctip_tags %}，并添加标签函数{% load_tctip %}到html中，建议放在head标签末尾{% load tctip_tags %}<!DOCTYPE html><htmllang="en"><head><!-- Required meta tags --><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><metaname="referrer"content="origin"><title>Title</title>{% load_tctip %}</head><body><div>django-tctip demo test !!!</div></body></html>step 5
前往管理界面添加数据即可显示到前台（参数都是可以通过后台配置的，参数的作用可以查看前台注释中描述，比较简单故不做说明）说明：django-tctip 是将tctip项目封装成了django的应用，感谢原项目https://github.com/greedying/tctip作者和删减版https://github.com/HaddyYang/tctip作者