Skip to main content

No project description provided

Project description

rest-framework-djongo

rest-framework-djongo 是一个用于处理 Djongo(Django 和 MongoDB 的集成)相关序列化和视图操作的工具库,帮助开发者更方便地在 Django REST Framework 中使用 MongoDB。

项目信息

  • 项目名称:rest-framework-djongo
  • 版本:0.1.2
  • 作者:vfeng 1914007838@qq.com
  • Python 版本要求:>=3.9

功能概述

序列化器

  • GenericDjongoSerializer:为 GenericDjongoModel 提供序列化功能,映射了多种 Django 模型字段到 Django REST Framework 的字段。
  • EmbeddedSerializer:用于处理嵌入式数据的序列化,继承自 GenericDjongoSerializer,并跳过了一些验证器。

字段

  • ObjectIdField:处理 MongoDB 的 ObjectId 类型数据,提供了 to_internal_valueto_representation 方法。
  • EmbeddedField:处理嵌入式字段,也提供了 to_internal_valueto_representation 方法。

视图

  • GenericAPIView:继承自 drf_generics.GenericAPIView,提供了 get_object 方法用于获取对象。

安装

该项目使用 Poetry 进行依赖管理,确保你已经安装了 Poetry(https://python-poetry.org/docs/#installation)。

克隆项目到本地:

git clone <项目仓库地址>
cd rest-framework-djongo

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

rest_framework_djongo-0.1.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rest_framework_djongo-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file rest_framework_djongo-0.1.2.tar.gz.

File metadata

  • Download URL: rest_framework_djongo-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/24.0.0

File hashes

Hashes for rest_framework_djongo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 56762a63eaa011d0e8f8c5742d0a5ef1eef59738f36a731faca1135caba153bb
MD5 21329e10608a0cff92125327872ad8f6
BLAKE2b-256 0b15bad054174893e5f12155f91966558ecb9d0d2ef679d2edefff9cf79ff17d

See more details on using hashes here.

File details

Details for the file rest_framework_djongo-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for rest_framework_djongo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46cd6f9fb25d662841ce4b80b3b4eead91c7f08024bd4f803b269654f1894f8f
MD5 cbc30e421aeabc676b8b07fca583fc15
BLAKE2b-256 04143e5f779943bdae607ea2ffe39803f980bf30bcc01901fcff952713889e40

See more details on using hashes here.

Supported by

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