django-tastypie


Namedjango-tastypie JSON
Version 0.15.0 PyPI version JSON
download
home_pagehttps://github.com/django-tastypie/django-tastypie
SummaryA flexible & capable API layer for Django.
upload_time2024-11-20 21:50:04
maintainerNone
docs_urlNone
authorDaniel Lindsley
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements python-dateutil python-mimeparse
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============
django-tastypie
===============

.. image:: https://readthedocs.org/projects/django-tastypie/badge/
    :target: https://django-tastypie.readthedocs.io/
    :alt: Docs

.. image:: https://github.com/django-tastypie/django-tastypie/actions/workflows/python-package.yml/badge.svg
    :target: https://github.com/django-tastypie/django-tastypie/actions
    :alt: CI

.. image:: https://coveralls.io/repos/django-tastypie/django-tastypie/badge.svg?service=github
    :target: https://coveralls.io/github/django-tastypie/django-tastypie
    :alt: Code Coverage

.. image:: https://img.shields.io/pypi/v/django-tastypie.svg
    :target: https://pypi.python.org/pypi/django-tastypie
    :alt: Version

.. image:: https://pypi-badges.global.ssl.fastly.net/svg?package=django-tastypie&timeframe=monthly
    :target: https://pypi.python.org/pypi/django-tastypie
    :alt: Downloads

Creating delicious APIs for Django apps since 2010.

Currently in beta but being used actively in production on several
sites.


Requirements
============

Core
----

* Python 3.8+ (Whatever is supported by your version of Django)
* Django 4.2 (LTS releases) or Django 4.0+ (intermediate releases, including 5.0 and 5.1)
* dateutil (http://labix.org/python-dateutil) >= 2.1

Format Support
--------------

* XML: lxml 3 (http://lxml.de/) and defusedxml (https://pypi.python.org/pypi/defusedxml)
* YAML: pyyaml (http://pyyaml.org/)
* binary plist: biplist (https://bitbucket.org/wooster/biplist)

Optional
--------

* HTTP Digest authentication: python3-digest (https://bitbucket.org/akoha/python-digest/)


What's It Look Like?
====================

A basic example looks like:

.. code:: python

    # 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.urls.conf import re_path, include
    from tastypie.api import Api
    from myapp.api import EntryResource

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

    urlpatterns = [
        # The normal jazz here then...
        re_path(r'^api/', include(v1_api.urls)),
    ]

That gets you a fully working, read-write API for the ``Entry`` model 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 at
https://django-tastypie.readthedocs.io/.


Why Tastypie?
=============

There are other 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).


Reference Material
==================

* https://django-tastypie.readthedocs.io/en/latest/
* https://github.com/django-tastypie/django-tastypie/tree/master/tests/basic shows
  basic usage of tastypie
* http://en.wikipedia.org/wiki/REST
* http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
* http://www.ietf.org/rfc/rfc2616.txt
* http://jacobian.org/writing/rest-worst-practices/


Getting Help
============

There are two primary ways of getting help.

1. Go to `StackOverflow`_ and post a question with the ``tastypie`` tag.
2. We have an IRC channel (`#tastypie on irc.freenode.net`_) to get help,
   bounce an idea by us, or generally shoot the breeze.

.. _`StackOverflow`: https://stackoverflow.com/questions/tagged/tastypie
.. _#tastypie on irc.freenode.net: irc://irc.freenode.net/tastypie


Security
========

Tastypie is committed to providing a flexible and secure API, and was designed
with many security features and options in mind. Due to the complex nature of
APIs and the constant discovery of new attack vectors and vulnerabilities,
no software is immune to security holes. We rely on our community to report
and help us investigate security issues.

If you come across a security hole **please do not open a Github issue**.
Instead, **drop us an email** at ``tastypie-security@googlegroups.com``

We'll then work together to investigate and resolve the problem so we can
announce a solution along with the vulnerability.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/django-tastypie/django-tastypie",
    "name": "django-tastypie",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Daniel Lindsley",
    "author_email": "daniel@toastdriven.com",
    "download_url": "https://files.pythonhosted.org/packages/c7/e1/dc8ab4a7f2304ee677175dd8f6b6edc328fb06cf5bab724657d94bbee2ab/django_tastypie-0.15.0.tar.gz",
    "platform": null,
    "description": "===============\ndjango-tastypie\n===============\n\n.. image:: https://readthedocs.org/projects/django-tastypie/badge/\n    :target: https://django-tastypie.readthedocs.io/\n    :alt: Docs\n\n.. image:: https://github.com/django-tastypie/django-tastypie/actions/workflows/python-package.yml/badge.svg\n    :target: https://github.com/django-tastypie/django-tastypie/actions\n    :alt: CI\n\n.. image:: https://coveralls.io/repos/django-tastypie/django-tastypie/badge.svg?service=github\n    :target: https://coveralls.io/github/django-tastypie/django-tastypie\n    :alt: Code Coverage\n\n.. image:: https://img.shields.io/pypi/v/django-tastypie.svg\n    :target: https://pypi.python.org/pypi/django-tastypie\n    :alt: Version\n\n.. image:: https://pypi-badges.global.ssl.fastly.net/svg?package=django-tastypie&timeframe=monthly\n    :target: https://pypi.python.org/pypi/django-tastypie\n    :alt: Downloads\n\nCreating delicious APIs for Django apps since 2010.\n\nCurrently in beta but being used actively in production on several\nsites.\n\n\nRequirements\n============\n\nCore\n----\n\n* Python 3.8+ (Whatever is supported by your version of Django)\n* Django 4.2 (LTS releases) or Django 4.0+ (intermediate releases, including 5.0 and 5.1)\n* dateutil (http://labix.org/python-dateutil) >= 2.1\n\nFormat Support\n--------------\n\n* XML: lxml 3 (http://lxml.de/) and defusedxml (https://pypi.python.org/pypi/defusedxml)\n* YAML: pyyaml (http://pyyaml.org/)\n* binary plist: biplist (https://bitbucket.org/wooster/biplist)\n\nOptional\n--------\n\n* HTTP Digest authentication: python3-digest (https://bitbucket.org/akoha/python-digest/)\n\n\nWhat's It Look Like?\n====================\n\nA basic example looks like:\n\n.. code:: python\n\n    # myapp/api.py\n    # ============\n    from tastypie.resources import ModelResource\n    from myapp.models import Entry\n\n\n    class EntryResource(ModelResource):\n        class Meta:\n            queryset = Entry.objects.all()\n\n\n    # urls.py\n    # =======\n    from django.urls.conf import re_path, include\n    from tastypie.api import Api\n    from myapp.api import EntryResource\n\n    v1_api = Api(api_name='v1')\n    v1_api.register(EntryResource())\n\n    urlpatterns = [\n        # The normal jazz here then...\n        re_path(r'^api/', include(v1_api.urls)),\n    ]\n\nThat gets you a fully working, read-write API for the ``Entry`` model that\nsupports all CRUD operations in a RESTful way. JSON/XML/YAML support is already\nthere, and it's easy to add related data/authentication/caching.\n\nYou can find more in the documentation at\nhttps://django-tastypie.readthedocs.io/.\n\n\nWhy Tastypie?\n=============\n\nThere are other API frameworks out there for Django. You need to\nassess the options available and decide for yourself. That said, here are some\ncommon reasons for tastypie.\n\n* You need an API that is RESTful and uses HTTP well.\n* You want to support deep relations.\n* You DON'T want to have to write your own serializer to make the output right.\n* You want an API framework that has little magic, very flexible and maps well to\n  the problem domain.\n* You want/need XML serialization that is treated equally to JSON (and YAML is\n  there too).\n\n\nReference Material\n==================\n\n* https://django-tastypie.readthedocs.io/en/latest/\n* https://github.com/django-tastypie/django-tastypie/tree/master/tests/basic shows\n  basic usage of tastypie\n* http://en.wikipedia.org/wiki/REST\n* http://en.wikipedia.org/wiki/List_of_HTTP_status_codes\n* http://www.ietf.org/rfc/rfc2616.txt\n* http://jacobian.org/writing/rest-worst-practices/\n\n\nGetting Help\n============\n\nThere are two primary ways of getting help.\n\n1. Go to `StackOverflow`_ and post a question with the ``tastypie`` tag.\n2. We have an IRC channel (`#tastypie on irc.freenode.net`_) to get help,\n   bounce an idea by us, or generally shoot the breeze.\n\n.. _`StackOverflow`: https://stackoverflow.com/questions/tagged/tastypie\n.. _#tastypie on irc.freenode.net: irc://irc.freenode.net/tastypie\n\n\nSecurity\n========\n\nTastypie is committed to providing a flexible and secure API, and was designed\nwith many security features and options in mind. Due to the complex nature of\nAPIs and the constant discovery of new attack vectors and vulnerabilities,\nno software is immune to security holes. We rely on our community to report\nand help us investigate security issues.\n\nIf you come across a security hole **please do not open a Github issue**.\nInstead, **drop us an email** at ``tastypie-security@googlegroups.com``\n\nWe'll then work together to investigate and resolve the problem so we can\nannounce a solution along with the vulnerability.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A flexible & capable API layer for Django.",
    "version": "0.15.0",
    "project_urls": {
        "Homepage": "https://github.com/django-tastypie/django-tastypie"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7e1dc8ab4a7f2304ee677175dd8f6b6edc328fb06cf5bab724657d94bbee2ab",
                "md5": "0fde521179149cab1fd6c3637d44be1b",
                "sha256": "baddce528e53646ee400e7c2dbee9a7c61b98a9fb67c8be2c3cf0f70eb10aa3c"
            },
            "downloads": -1,
            "filename": "django_tastypie-0.15.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0fde521179149cab1fd6c3637d44be1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 156296,
            "upload_time": "2024-11-20T21:50:04",
            "upload_time_iso_8601": "2024-11-20T21:50:04.656592Z",
            "url": "https://files.pythonhosted.org/packages/c7/e1/dc8ab4a7f2304ee677175dd8f6b6edc328fb06cf5bab724657d94bbee2ab/django_tastypie-0.15.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 21:50:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "django-tastypie",
    "github_project": "django-tastypie",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "python-dateutil",
            "specs": [
                [
                    ">=",
                    "2.1"
                ]
            ]
        },
        {
            "name": "python-mimeparse",
            "specs": [
                [
                    ">=",
                    "0.1.4"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "django-tastypie"
}
        
Elapsed time: 0.42669s