{ "info": { "author": "Robert Singer", "author_email": "robertgsinger@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "## Django REST Framework - Typed Views\n\nThis project extends [Django Rest Framework](https://www.django-rest-framework.org/) to allow use of Python's type annotations for automatically validating and casting view parameters. This pattern makes for code that is easier to read and write. View inputs are individually declared, not buried inside all-encompassing `request` objects. Meanwhile, you get even more out of type annotations: they can replace repetitive validation/sanitization code. \n\nMore features:\n- [Pydantic](https://pydantic-docs.helpmanual.io/) models and [Marshmallow](https://marshmallow.readthedocs.io) schemas are compatible types for view parameters. Annotate your POST/PUT functions with them to automatically validate incoming request bodies.\n- Advanced validators for more than just the type: `min_value`/`max_value` for numbers\n- Validate string formats: `email`, `uuid` and `ipv4/6`; use Python's native `Enum` for \"choices\" validation\n\nQuick example:\n```python\nfrom rest_typed_views import typed_api_view\n\n@typed_api_view([\"GET\"])\ndef get_users(registered_on: date = None, groups: List[int] = None, is_staff: bool = None):\n if groups is None:\n groups = []\n print(registered_on, login_count__gte, groups, is_staff)\n```\n\nGET `/users/registered/?registered_on=2019-03-03&groups=4,5&is_staff=yes`
\nStatus Code: 200\n```\n date(2019, 3, 3) [4, 5] True\n```\n\nGET `/users/?registered_on=9999&groups=admin&is_staff=maybe`
\n:no_entry_sign: Status Code: 400 *ValidationError raised* \n```json\n {\n \"registered_on\": \"'9999' is not a valid date\",\n \"groups\": \"'admin' is not a valid integer\",\n \"is_staff\": \"'maybe' is not a valid boolean\"\n }\n```\n## Table of Contents\n* [Install & Decorators](#install--decorators)\n* [How It Works: Simple Usage](#how-it-works-simple-usage)\n * [Basic GET Request](#basic-get-request)\n * [Basic POST Request](#basic-post-request)\n* [How It Works: Advanced Usage](#how-it-works-advanced-usage)\n * [Additional Validation Rules](#additional-validation-rules)\n * [Nested Body Fields](#nested-body-fields)\n * [List Validation](#list-validation)\n * [Accessing the Request Object](#accessing-the-request-object)\n * [Interdependent Query Parameter Validation](#interdependent-query-parameter-validation)\n * [(Simple) Access Control](#simple-access-control)\n* [Enabling Marshmallow, Pydantic Schemas](#enabling-3rd-party-validators)\n* [Request Element Classes](#request-element-classes)\n * [Query](#query)\n * [Body](#body)\n * [Path](#path)\n * [CurrentUser](#currentuser)\n* [Supported Types/Validator Rules](#supported-types-and-validator-rules)\n * [int](#int)\n * [float](#float)\n * [Decimal](#decimal)\n * [str](#str)\n * [bool](#bool)\n * [datetime](#datetime)\n * [date](#date)\n * [time](#time)\n * [timedelta](#timedelta)\n * [List](#list)\n * [Enum](#enum)\n * [marshmallow.Schema](#marshmallowschema)\n * [pydantic.BaseModel](#pydanticbasemodel)\n* [Motivation & Inspiration](#motivation)\n\n## Install & Decorators\n\n```\npip install rest_typed_views\n```\n\nYou can add type annotation-enabled features to either `ViewSet` methods or function-based views using the `typed_action` and `typed_api_view` decorators. They take the exact same arguments as Django REST's [`api_view`](https://www.django-rest-framework.org/api-guide/views/#api_view) and [`action`](https://www.django-rest-framework.org/api-guide/viewsets/#marking-extra-actions-for-routing) decorators.\n\n## How It Works: Simple Usage\n\nFor many cases, you can rely on implicit behavior for how different parts of the request (URL path variables, query parameters, body) map to the parameters of a view function/method. \n\nThe value of a view parameter will come from...\n- the URL path if the path variable and the view argument have the same name, *or*:\n- the request body if the view argument is annotated using a class from a supported library for complex object validation (Pydantic, MarshMallow), *or*:\n- a query parameter with the same name\n\nUnless a default value is given, the parameter is **required** and a [`ValidationError`](https://www.django-rest-framework.org/api-guide/exceptions/#validationerror) will be raised if not set.\n\n### Basic GET Request\n```python\nurlpatterns = [\n url(r\"^(?P[\\w+])/restaurants/\", search_restaurants)\n]\n\nfrom rest_typed_views import typed_api_view\n\n# Example request: /chicago/restaurnts?delivery=yes\n@typed_api_view([\"GET\"])\ndef search_restaurants(city: str, rating: float = None, offers_delivery: bool = None):\n restaurants = Restaurant.objects.filter(city=city)\n\n if rating not None:\n restaurants = restaurants.filter(rating__gte=rating)\n\n if offers_delivery not None:\n restaurants = restaurants.filter(delivery=offers_delivery)\n```\n\nIn this example, `city` is required and must be its string. Its value comes from the URL path variable with the same name. The other parameters, `rating` and `offers_delivery`, are not part of the path parameters and are assumed to be query parameters. They both have a default value, so they are optional.\n\n### Basic POST Request \n```python\n# urls.py\nurlpatterns = [url(r\"^(?P[\\w+])/bookings/\", create_booking)]\n\n# settings.py\nDRF_TYPED_VIEWS = {\"schema_packages\": [\"pydantic\"]}\n\n# views.py\nfrom pydantic import BaseModel\nfrom rest_typed_views import typed_api_view\n\n\nclass RoomEnum(str, Enum):\n double = 'double'\n twin = 'twin'\n single = 'single'\n\n\nclass BookingSchema(BaseModel):\n start_date: date\n end_date: date\n room: RoomEnum = RoomEnum.double\n include_breakfast: bool = False\n\n# Example request: /chicago/bookings/\n@typed_api_view([\"POST\"])\ndef create_booking(city: str, booking: BookingSchema):\n # do something with the validated booking...\n```\n\nIn this example, `city` will again be populated using the URL path variable. The `booking` parameter is annotated using a supported complex schema class (Pydantic), so it's assumed to come from the request body, which will be read in as JSON, used to hydrate the Pydantic `BookingSchema` and then validated. If validation fails a `ValidationError` will be raised.\n\n## How It Works: Advanced Usage\n\nFor more advanced use cases, you can explicitly declare how each parameter's value is sourced from the request -- from the query parameters, path, body or headers -- as well as define additional validation rules. You import a class named after the request element that is expected to hold the value and assign it to the parameter's default.\n\n```python\nfrom rest_typed_views import typed_api_view, Query, Path\n\n@typed_api_view([\"GET\"])\ndef list_documents(year: date = Path(), title: str = Query(default=None)):\n # ORM logic here...\n```\n\nIn this example, `year` is required and must come from the URL path and `title` is an optional query parameter because the `default` is set. This is similar to Django REST's [serializer fields](https://www.django-rest-framework.org/api-guide/fields/#core-arguments): passing a default implies that the filed is not required. \n\n### Additional Validation Rules\n\nYou can use the request element class (`Query`, `Path`, `Body`) to set additional validation constraints. You'll find that these keywords are consistent with Django REST's serializer fields.\n\n```python\nfrom rest_typed_views import typed_api_view, Query, Path\n\n@typed_api_view([\"GET\"])\ndef search_restaurants(\n year: date = Path(), \n rating: int = Query(default=None, min_value=1, max_value=5)\n):\n # ORM logic here...\n\n\n@typed_api_view([\"GET\"])\ndef get_document(id: str = Path(format=\"uuid\")):\n # ORM logic here...\n\n\n@typed_api_view([\"GET\"])\ndef search_users(\n email: str = Query(default=None, format=\"email\"), \n ip_address: str = Query(default=None, format=\"ip\"), \n):\n # ORM logic here...\n```\n\nView a [full list](#supported-types-and-validator-rules) of supported types and additional validation rules.\n\n### Nested Body Fields\n\nSimilar to how `source` is used in Django REST to control field mappings during serialization, you can use it to specify the exact path to the request data.\n\n```python\nfrom pydantic import BaseModel\nfrom rest_typed_views import typed_api_view, Query, Path\n\nclass Document(BaseModel):\n title: str\n body: str\n\n\"\"\"\n POST\n {\n \"strict\": false,\n \"data\": {\n \"title\": \"A Dark and Stormy Night\",\n \"body\": \"Once upon a time\"\n }\n }\n\"\"\"\n@typed_api_view([\"POST\"])\ndef create_document(\n strict_mode: bool = Body(source=\"strict\"), \n item: Document = Body(source=\"data\")\n):\n # ORM logic here...\n```\nYou can also use dot-notation to source data multiple levels deep in the JSON payload.\n\n### List Validation\n\nFor the basic case of list validation - validating types within a comma-delimited string - declare the type to get automatic validation/coercion:\n\n```python\nfrom rest_typed_views import typed_api_view, Query\n\n@typed_api_view([\"GET\"])\ndef search_movies(item_ids: List[int] = [])):\n print(item_ids)\n\n# GET /movies?items_ids=41,64,3\n# [41, 64, 3]\n```\n\nBut you can also specify `min_length` and `max_length`, as well as the `delimiter` and specify additional rules for the child items -- think Django REST's [ListField](https://www.django-rest-framework.org/api-guide/fields/#listfield).\n\nImport the generic `Param` class and use it to set the rules for the `child` elements:\n\n```python\nfrom rest_typed_views import typed_api_view, Query, Param\n\n@typed_api_view([\"GET\"])\ndef search_outcomes(\n scores: List[int] = Query(delimiter=\"|\", child=Param(min_value=0, max_value=100))\n):\n # ORM logic ...\n\n@typed_api_view([\"GET\"])\ndef search_message(\n recipients: List[str] = Query(min_length=1, max_length=10, child=Param(format=\"email\"))\n):\n # ORM logic ...\n```\n\n### Accessing the Request Object\n\nYou probably won't need to access the `request` object directly, as this package will provide its relevant properties as view arguments. However, you can include it as a parameter annotated with its type and it will be injected:\n\n```python\nfrom rest_framework.request import Request\nfrom rest_typed_views import typed_api_view\n\n@typed_api_view([\"GET\"])\ndef search_documens(request: Request, q: str = None):\n # ORM logic ...\n```\n\n### Interdependent Query Parameter Validation\nOften, it's useful to validate a combination of query parameters - for instance, a `start_date` shouldn't come after an `end_date`. You can use complex schema object (Pydantic or Marshmallow) for this scenario. In the example below, `Query(source=\"*\")` is instructing an instance of `SearchParamsSchema` to be populated/validated using all of the query parameters together: `request.query_params.dict()`. \n\n```python\nfrom marshmallow import Schema, fields, validates_schema, ValidationError\nfrom rest_typed_views import typed_api_view\n\nclass SearchParamsSchema(Schema):\n start_date = fields.Date()\n end_date = fields.Date()\n\n @validates_schema\n def validate_numbers(self, data, **kwargs):\n if data[\"start_date\"] >= data[\"end_date\"]:\n raise ValidationError(\"end_date must come after start_date\")\n\n@typed_api_view([\"GET\"])\ndef search_documens(search_params: SearchParamsSchema = Query(source=\"*\")):\n # ORM logic ...\n```\n\n### (Simple) Access Control\n\nYou can apply some very basic access control by applying some validation rules to a view parameter sourced from the `CurrentUser` request element class. In the example below, a `ValidationError` will be raised if the `request.user` is not a member of either `super_users` or `admins`.\n\n```python\n from my_pydantic_schemas import BookingSchema\n from rest_typed_views import typed_api_view, CurrentUser\n\n @typed_api_view([\"POST\"])\n def create_booking(\n booking: BookingSchema, \n user: User = CurrentUser(member_of_any=[\"super_users\", \"admins\"])\n ):\n # Do something with the request.user\n```\n\nRead more about the [`Current User` request element class](#current-user-keywords).\n\n## Enabling Marshmallow, Pydantic Schemas \n\nAs an alternative to Django REST's serializers, you can annotate views with [Pydantic](https://pydantic-docs.helpmanual.io/) models or [Marshmallow](https://marshmallow.readthedocs.io/en/stable/) schemas to have their parameters automatically validated and pass an instance of the Pydantic/Marshmallow class to your method/function.\n\nTo enable support for third-party libraries for complex object validation, modify your settings:\n\n```python\nDRF_TYPED_VIEWS = {\n \"schema_packages\": [\"pydantic\", \"marshmallow\"]\n}\n```\n\nThese third-party packages must be installed in your virtual environment/runtime.\n\n## Request Element Classes\n\nYou can specify the part of the request that holds each view parameter by using default function arguments, for example:\n```python\n from rest_typed_views import Body, Query\n\n @typed_api_view([\"PUT\"])\n def update_user(\n user: UserSchema = Body(), \n optimistic_update: bool = Query(default=False)\n ):\n```\n\nThe `user` parameter will come from the request body and is required because no default is provided. Meanwhile, `optimistic_update` is not required and will be populated from a query parameter with the same name. \n\nThe core keyword arguments to these classes are:\n- `default` the default value for the parameter, which is required unless set\n- `source` if the view parameter has a different name than its key embedded in the request\n\nPassing keywords for additional validation constraints is a *powerful capability* that gets you *almost the same feature set* as Django REST's flexible [serializer fields](https://www.django-rest-framework.org/api-guide/fields/). See a [complete list](#supported-types-and-validator-rule) of validation keywords.\n\n\n### Query\nUse the `source` argument to alias the parameter value and pass keywords to set additional constraints. For example, your query parameters can have dashes, but be mapped to a parameter that have underscores:\n\n```python\n from rest_typed_views import typed_api_view, Query\n\n @typed_api_view([\"GET\"])\n def search_events(\n starting_after: date = Query(source=\"starting-after\"),\n available_tickets: int = Query(default=0, min_value=0)\n ):\n # ORM logic here...\n```\n\n### Body\nBy default, the entire request body is used to populate parameters marked with this class (`source=\"*\"`):\n\n```python\n from rest_typed_views import typed_api_view, Body\n from my_pydantic_schemas import ResidenceListing\n\n @typed_api_view([\"POST\"])\n def create_listing(residence: ResidenceListing = Body()):\n # ORM logic ...\n```\n\nHowever, you can also specify nested fields in the request body, with support for dot notation.\n\n```python\n \"\"\"\n POST /users/\n {\n \"first_name\": \"Homer\",\n \"last_name\": \"Simpson\",\n \"contact\": {\n \"phone\" : \"800-123-456\",\n \"fax\": \"13235551234\"\n }\n }\n \"\"\"\n from rest_typed_views import typed_api_view, Body\n\n @typed_api_view([\"POST\"])\n def create_user(\n first_name: str = Body(source=\"first_name\"),\n last_name: str = Body(source=\"last_name\"),\n phone: str = Body(source=\"contact.phone\", min_length=10, max_length=20)\n ):\n # ORM logic ...\n```\n\n### Path\nUse the `source` argument to alias a view parameter name. More commonly, though, you can set additional validation rules for parameters coming from the URL path. \n\n```python\n from rest_typed_views import typed_api_view, Query\n\n @typed_api_view([\"GET\"])\n def retrieve_event(id: int = Path(min_value=0, max_value=1000)):\n # ORM logic here...\n```\n\n### CurrentUser \n\nUse this class to have a view parameter populated with the current user of the request. You can even extract fields from the current user using the `source` option.\n\n```python\n from my_pydantic_schemas import BookingSchema\n from rest_typed_views import typed_api_view, CurrentUser\n\n @typed_api_view([\"POST\"])\n def create_booking(booking: BookingSchema, user: User = CurrentUser()):\n # Do something with the request.user\n\n @typed_api_view([\"GET\"])\n def retrieve_something(first_name: str = CurrentUser(source=\"first_name\")):\n # Do something with the request.user's first name\n```\nYou can also pass some additional parameters to the `CurrentUser` request element class to implement simple access control:\n- `member_of` (str) Validates that the current `request.user` is a member of a group with this name\n- `member_of_any` (List[str]) Validates that the current `request.user` is a member of one of these groups\n\n*Using these keyword validators assumes that your `User` model has a many-to-many relationship with `django.contrib.auth.models.Group` via `user.groups`.*\n\nAn example:\n\n```python\nfrom django.contrib.auth.models import User\nfrom rest_typed_views import typed_api_view, CurrentUser\n\n@typed_api_view([\"GET\"])\ndef do_something(user: User = CurrentUser(member_of=\"admin\")):\n # now have a user instance (assuming ValidationError wasn't raised)\n```\n## Supported Types and Validator Rules\n\nThe following native Python types are supported. Depending on the type, you can pass additional validation rules to the request element class (`Query`, `Path`, `Body`). You can think of the type combining with the validation rules to create a Django REST serializer field on the fly -- in fact, that's what happens behind the scenes.\n\n### str\nAdditional arguments:\n- `max_length` Validates that the input contains no more than this number of characters.\n- `min_length` Validates that the input contains no fewer than this number of characters.\n- `trim_whitespace` (bool; default `True`) Whether to trim leading and trailing white space.\n- `format` Validates that the string matches a common format; supported values:\n - `email` validates the text to be a valid e-mail address.\n - `slug` validates the input against the pattern `[a-zA-Z0-9_-]+`.\n - `uuid` validates the input is a valid UUID string\n - `url` validates fully qualified URLs of the form `http:///`\n - `ip` validates input is a valid IPv4 or IPv6 string\n - `ipv4` validates input is a valid IPv4 string\n - `ipv6` validates input is a valid IPv6 string\n - `file_path` validates that the input corresponds to filenames in a certain directory on the filesystem; allows all the same keyword arguments as Django REST's [`FilePathField`](https://www.django-rest-framework.org/api-guide/fields/#filepathfield)\n\nSome examples:\n\n```python\nfrom rest_typed_views import typed_api_view, Query\n\n@typed_api_view([\"GET\"])\ndef search_users(email: str = Query(format='email')):\n # ORM logic here...\n return Response(data)\n\n@typed_api_view([\"GET\"])\ndef search_shared_links(url: str = Query(default=None, format='url')):\n # ORM logic here...\n return Response(data)\n\n@typed_api_view([\"GET\"])\ndef search_request_logs(ip_address: str = Query(default=None, format='ip')):\n # ORM logic here...\n return Response(data)\n```\n\n### int\nAdditional arguments:\n- `max_value` Validate that the number provided is no greater than this value.\n- `min_value` Validate that the number provided is no less than this value.\n\nAn example:\n```python\nfrom rest_typed_views import typed_api_view, Query\n\n@typed_api_view([\"GET\"])\ndef search_products(inventory: int = Query(min_value=0)):\n # ORM logic here...\n```\n\n### float\nAdditional arguments:\n- `max_value` Validate that the number provided is no greater than this value.\n- `min_value` Validate that the number provided is no less than this value.\n\nAn example:\n```python\nfrom rest_typed_views import typed_api_view, Query\n\n@typed_api_view([\"GET\"])\ndef search_products(price: float = Query(min_value=0)):\n # ORM logic here...\n```\n\n### Decimal\nAdditional arguments:\n- `max_value` Validate that the number provided is no greater than this value.\n- `min_value` Validate that the number provided is no less than this value.\n- .. even more ... accepts the same arguments as [Django REST's `DecimalField`](https://www.django-rest-framework.org/api-guide/fields/#decimalfield)\n\n### bool\nView parameters annotated with this type will validate and coerce the same values as Django REST's `BooleanField`, including but not limited to the following:\n```python\n true_values = [\"yes\", 1, \"on\", \"y\", \"true\"]\n false_values = [\"no\", 0, \"off\", \"n\", \"false\"]\n```\n\n### datetime\nAdditional arguments:\n- `input_formats` A list of input formats which may be used to parse the date-time, defaults to Django's `DATETIME_INPUT_FORMATS` settings, which defaults to `['iso-8601']`\n- `default_timezone` A `pytz.timezone` of the timezone. If not specified, falls back to Django's `USE_TZ` setting.\n\n### date\nAdditional arguments:\n- `input_formats` A list of input formats which may be used to parse the date, defaults to Django's `DATETIME_INPUT_FORMATS` settings, which defaults to `['iso-8601']`\n\n### time\nAdditional arguments:\n- `input_formats` A list of input formats which may be used to parse the time, defaults to Django's `TIME_INPUT_FORMATS` settings, which defaults to `['iso-8601']`\n\n### timedelta\nValidates strings of the format `'[DD] [HH:[MM:]]ss[.uuuuuu]'` and converts them to a `datetime.timedelta` instance.\n\nAdditional arguments:\n- `max_value` Validate that the input duration is no greater than this value.\n- `min_value` Validate that the input duration is no less than this value.\n\n### List\nValidates strings of the format `'[DD] [HH:[MM:]]ss[.uuuuuu]'` and converts them to a `datetime.timedelta` instance.\n\nAdditional arguments:\n- `min_length` Validates that the list contains no fewer than this number of elements.\n- `max_length` Validates that the list contains no more than this number of elements.\n- `child` Pass keyword constraints via a `Param` instance to to validate the members of the list.\n\nAn example:\n```python\nfrom rest_typed_views import typed_api_view, Param, Query\n\n@typed_api_view([\"GET\"])\ndef search_contacts(emails: List[str] = Query(max_length=10, child=Param(format=\"email\"))):\n # ORM logic here...\n```\n\n### Enum\nValidates that the value of the input is one of a limited set of choices. Think of this as mapping to a Django REST [`ChoiceField`](https://www.django-rest-framework.org/api-guide/fields/#choicefield).\n\nAn example:\n```python\nfrom rest_typed_views import typed_api_view, Query\n\nclass Straws(str, Enum):\n paper = \"paper\"\n plastic = \"plastic\"\n\n@typed_api_view([\"GET\"])\ndef search_straws(type: Straws = None):\n # ORM logic here...\n```\n\n### marshmallow.Schema\nYou can annotate view parameters with [Marshmallow schemas](https://marshmallow.readthedocs.io/en/stable/) to validate request data and pass an instance of the schema to the view.\n\n```python\nfrom marshmallow import Schema, fields\nfrom rest_typed_views import typed_api_view, Query\n\nclass ArtistSchema(Schema):\n name = fields.Str()\n\nclass AlbumSchema(Schema):\n title = fields.Str()\n release_date = fields.Date()\n artist = fields.Nested(ArtistSchema())\n\n\"\"\"\n POST \n {\n \"title\": \"Michael Scott's Greatest Hits\",\n \"release_date\": \"2019-03-03\",\n \"artist\": {\n \"name\": \"Michael Scott\"\n }\n }\n\"\"\"\n@typed_api_view([\"POST\"])\ndef create_album(album: AlbumSchema):\n # now have an album instance (assuming ValidationError wasn't raised)\n```\n\n### pydantic.BaseModel\nYou can annotate view parameters with [Pydantic models](https://pydantic-docs.helpmanual.io/) to validate request data and pass an instance of the model to the view.\n\n```python\nfrom pydantic import BaseModel\nfrom rest_typed_views import typed_api_view, Query\n\nclass User(BaseModel):\n id: int\n name: str\n signup_ts: datetime = None\n friends: List[int] = []\n\n\"\"\"\n POST \n {\n \"id\": 24529782,\n \"name\": \"Michael Scott\",\n \"friends\": [24529782]\n }\n\"\"\"\n@typed_api_view([\"POST\"])\ndef create_user(user: User):\n # now have a user instance (assuming ValidationError wasn't raised)\n```\n\n## Motivation\n\nWhile REST Framework's ModelViewSets and ModelSerializers are very productive when building out CRUD resources, I've felt less productive in the framework when developing other types of operations. Serializers are a powerful and flexible way to validate incoming request data, but are not as self-documenting as type annotations. Furthermore, the Django ecosystem is hugely productive and I see no reason why REST Framework cannot take advantage of more Python 3 features.\n\n## Inspiration\n\nI first came across type annotations for validation in [API Star](https://github.com/encode/apistar), which has since evolved into an OpenAPI toolkit. This pattern has also been offered by [Hug](https://hugapi.github.io/hug/) and [Molten](https://github.com/Bogdanp/molten) (I believe in that order). Furthermore, I've borrowed ideas from [FastAPI](https://github.com/tiangolo/fastapi), specifically its use of default values to declare additional validation rules. Finally, this [blog post](https://instagram-engineering.com/types-for-python-http-apis-an-instagram-story-d3c3a207fdb7) from Instagram's engineering team showed me how decorators can be used to implement these features on view functions.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rsinger86/drf-typed-views", "keywords": "django rest type annotations automatic validation validate", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "drf-typed-views", "package_url": "https://pypi.org/project/drf-typed-views/", "platform": "", "project_url": "https://pypi.org/project/drf-typed-views/", "project_urls": { "Homepage": "https://github.com/rsinger86/drf-typed-views" }, "release_url": "https://pypi.org/project/drf-typed-views/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Use type annotations for automatic request validation in Django REST Framework", "version": "0.1.5" }, "last_serial": 5987225, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "17216bd55f4cb1ff1488e15e2c9bfe61", "sha256": "7533b4ace7056d4532914f5a20aed0d1665a34ff9a276503a4de26002f5a11be" }, "downloads": -1, "filename": "drf-typed-views-0.1.0.tar.gz", "has_sig": false, "md5_digest": "17216bd55f4cb1ff1488e15e2c9bfe61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20583, "upload_time": "2019-10-03T05:48:41", "url": "https://files.pythonhosted.org/packages/fd/1c/dc9d90a7580b803eac2378ee81a1007a2ff5a27f0d597af0eb64cc6dd6ef/drf-typed-views-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6dec9de3916ebb8f2519a16b191c6442", "sha256": "dbaa913b5f8571cfd63695ac42a6a6d9e562387233c4e13e2239d0f7f019c71f" }, "downloads": -1, "filename": "drf-typed-views-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6dec9de3916ebb8f2519a16b191c6442", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20585, "upload_time": "2019-10-03T23:19:12", "url": "https://files.pythonhosted.org/packages/dc/09/3b4892f2935f477c08a4b0ded43b414f47c72afd105e8aa44f032afbf456/drf-typed-views-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4772e2cef8c1a410624ee8687cf4fd1f", "sha256": "66a16153c9d40c045323ffcd17d2ee1352a5e544da122b08300a1a5fe5085a28" }, "downloads": -1, "filename": "drf-typed-views-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4772e2cef8c1a410624ee8687cf4fd1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21182, "upload_time": "2019-10-09T04:11:45", "url": "https://files.pythonhosted.org/packages/79/b6/dec247b90f3934568a37b53ec6a2f26296ca2a33c778b90d9fd1fe889ef9/drf-typed-views-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "280a37d9ec7baa72b1da16ba6bc4423c", "sha256": "cfeb92aff0baa2122c08de6d90cd033967753f22c306d83dca90bcc2e31885d7" }, "downloads": -1, "filename": "drf-typed-views-0.1.3.tar.gz", "has_sig": false, "md5_digest": "280a37d9ec7baa72b1da16ba6bc4423c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23084, "upload_time": "2019-10-09T04:27:20", "url": "https://files.pythonhosted.org/packages/7e/55/6be2ebe1bcf3840df554cae6845bae90d1998959712811de6eef8c6e0d6b/drf-typed-views-0.1.3.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "8b36e80f050c02d328c41be1697d4ebe", "sha256": "95f56f517f8a2eda4a11019cabefc462dcea92f8008e8de5c13792aa871a4509" }, "downloads": -1, "filename": "drf-typed-views-0.1.5.tar.gz", "has_sig": false, "md5_digest": "8b36e80f050c02d328c41be1697d4ebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23117, "upload_time": "2019-10-17T02:12:39", "url": "https://files.pythonhosted.org/packages/7e/6d/d8d42cf8da6b6806946435de43c3107cb2b686e2258b88f7bac59a4d1e94/drf-typed-views-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b36e80f050c02d328c41be1697d4ebe", "sha256": "95f56f517f8a2eda4a11019cabefc462dcea92f8008e8de5c13792aa871a4509" }, "downloads": -1, "filename": "drf-typed-views-0.1.5.tar.gz", "has_sig": false, "md5_digest": "8b36e80f050c02d328c41be1697d4ebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23117, "upload_time": "2019-10-17T02:12:39", "url": "https://files.pythonhosted.org/packages/7e/6d/d8d42cf8da6b6806946435de43c3107cb2b686e2258b88f7bac59a4d1e94/drf-typed-views-0.1.5.tar.gz" } ] }