Skip to main content

Write powerful APIs with Django and Pydantic; I/O validation, Swagger/OpenAPI docs, and more.

Project description

Introduction

This is the documentation for the Djapy library, which is designed to let you make RESTful APIs within Django with as no boilerplate, using plain Python and Django, with the supremacy of Pydantic.

Djapy is molded according to Django's philosophy of "batteries included", and is designed to be as simple as possible to use, while still being powerful enough to handle most use cases.

@djapify
def get_user(request) -> {200: UserSchema, 404: str}:
    return request.user

It's that simple!

Features

  • Complete input/output data flow control
  • Extensible and extremely customizable auth; SessionAuth provided in-built
  • Hyper type checking, pydantic-based, and swagger integrated
  • CursorPagination, OffsetLimitPagination and PageNumber out of the box; with ability to create custom pagination
  • Validation, validation messages, with complete control over each validation process
  • Customizable error handling, and error messages
  • Completely Django friendly, and can be used with any Django project

Installation

Djapy is available on PyPI, and can be installed with pip:

pip install djapy
# or pip install git+https://github.com/Bishwas-py/djapy.git@main

Creating a new project

To create a new project, run the following command:

django-admin startproject <project_name>

See sample: project. Fork project: bishwas-py/djapy.

More on this in the Usage section.

Contribution Guidelines

We welcome all contributions to Djapy, and have a set of guidelines to ensure that the process is as smooth as possible.

Please read the Contribution Guidelines before contributing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djapy-0.1.104.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

djapy-0.1.104-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file djapy-0.1.104.tar.gz.

File metadata

  • Download URL: djapy-0.1.104.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for djapy-0.1.104.tar.gz
Algorithm Hash digest
SHA256 f294529fb8cf905f8d85b86c8664409239af20a4f6238f6089f66c1f160851b0
MD5 4db0eabd9c19ad13d05e6f49c9df6a3f
BLAKE2b-256 a5476c676539c6d121c924c14219f39171740fa8859e455b037a74ac29ed532b

See more details on using hashes here.

File details

Details for the file djapy-0.1.104-py3-none-any.whl.

File metadata

  • Download URL: djapy-0.1.104-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for djapy-0.1.104-py3-none-any.whl
Algorithm Hash digest
SHA256 6a28b13d26705b06a41513586c7f65769644e07882758174c6632c078f405df6
MD5 6ee12a830b790de34876fd54ec815be7
BLAKE2b-256 13505fbb7248988e2489302d3142af460fc52905e15c8f59bed4b64d2275f098

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page