Django-ninja

Latest version: v1.1.0

Safety actively analyzes 622275 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

1.1.0

What's Changed
* Pagination set max limit by HyoungSooo in https://github.com/vitalik/django-ninja/pull/915
* Fixed Fields not generated when Meta.fields_optional = '__all__' by vitalik in https://github.com/vitalik/django-ninja/pull/986
* Add UUID to supported fields by gokaykucuk in https://github.com/vitalik/django-ninja/pull/982
* Remove Redoc body margin by Nekidev in https://github.com/vitalik/django-ninja/pull/887
* Replace deprecated Pydantic method by scott-8 in https://github.com/vitalik/django-ninja/pull/922
* More comprehensive documentation for CSRF protection by c4ffein in https://github.com/vitalik/django-ninja/pull/906
* Git ignore coverage.xml file by adamchainz in https://github.com/vitalik/django-ninja/pull/944
* Fix pytest.mark.asyncio warning by adamchainz in https://github.com/vitalik/django-ninja/pull/943
* Use ruff to format code instead of black by jairhenrique in https://github.com/vitalik/django-ninja/pull/949
* Attribute `description` declared has type `str` but is used as type None by luca-digrazia in https://github.com/vitalik/django-ninja/pull/530
* Fix test warning by jairhenrique in https://github.com/vitalik/django-ninja/pull/951
* Drop support to unsupported python and django versions by jairhenrique in https://github.com/vitalik/django-ninja/pull/950
* test: Add django 5.0 to the test matrix by marksweb in https://github.com/vitalik/django-ninja/pull/954
* Fix mypy issues by jairhenrique in https://github.com/vitalik/django-ninja/pull/956
* Enable UP rule on ruff by jairhenrique in https://github.com/vitalik/django-ninja/pull/957
* Enable FURB rule on ruff by jairhenrique in https://github.com/vitalik/django-ninja/pull/958
* docs: remove extra backtick in api docs page by noahgorstein in https://github.com/vitalik/django-ninja/pull/964
* Enable PTH rule on ruff by jairhenrique in https://github.com/vitalik/django-ninja/pull/966
* Update ninja conf docs by jamesrkiger in https://github.com/vitalik/django-ninja/pull/972



New Contributors
* c4ffein made their first contribution in https://github.com/vitalik/django-ninja/pull/906
* adamchainz made their first contribution in https://github.com/vitalik/django-ninja/pull/944
* luca-digrazia made their first contribution in https://github.com/vitalik/django-ninja/pull/530
* Nekidev made their first contribution in https://github.com/vitalik/django-ninja/pull/887
* marksweb made their first contribution in https://github.com/vitalik/django-ninja/pull/954
* noahgorstein made their first contribution in https://github.com/vitalik/django-ninja/pull/964
* HyoungSooo made their first contribution in https://github.com/vitalik/django-ninja/pull/915
* jamesrkiger made their first contribution in https://github.com/vitalik/django-ninja/pull/972
* gokaykucuk made their first contribution in https://github.com/vitalik/django-ninja/pull/982

**Full Changelog**: https://github.com/vitalik/django-ninja/compare/v1.0.1...v1.1.0

1.0.1

Fixed `from_orm` compatibility

1.0

Read more details and examples here https://django-ninja.dev/whatsnew_v1/

or watch overview video :


<a href="https://youtu.be/GrIpDXPG41o"><img width="500" alt="SCR-20231116-qmoj" src="https://github.com/vitalik/django-ninja/assets/95222/06958fbf-6d3a-4f33-aa76-7a29279c9959"></a>



Overview

- **async authentication** fully supported on all layers
- New parameters markers syntax (+ **`Annotated[]`** syntax support)
- **CSRF is now automatic** on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- **Pydantic2** - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I tried to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change



Contributors

AlTosterino
AmiZya
Kristinus
ddahan
dipbazz
ivoire
lilleswing
marius-mather
pavel-beaufort
pawelngei
scott-8
skokado
vincentdavis
vpoulailleau
yasoob

Thank you !

**Full Changelog**: https://github.com/vitalik/django-ninja/compare/v0.22.2...v1.0

1.0rc

What's Changed
* Fixed not awaitable response in async authentication (44)

This looks like the final pre-release - and I'm happy to report that beta versions was successfully tested by multiple companies in production environments


What's new in 1.x

- **async authentication** fully supported on all layers
- New parameters markers syntax (+ **`Annotated[]`** syntax support)
- **CSRF is now automatic** on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- **Pydantic2** - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change



Documentation
* Fix spelling error in motivation documentation by lilleswing in https://github.com/vitalik/django-ninja/pull/874
* Add partial updates and strict validation to the CRUD tutorial by ddahan in https://github.com/vitalik/django-ninja/pull/877
* docs: configure syntax coloring by ivoire in https://github.com/vitalik/django-ninja/pull/878
* docs: use lowercase for language identifier by ivoire in https://github.com/vitalik/django-ninja/pull/879

New Contributors
* lilleswing made their first contribution in https://github.com/vitalik/django-ninja/pull/874
* ddahan made their first contribution in https://github.com/vitalik/django-ninja/pull/877
* ivoire made their first contribution in https://github.com/vitalik/django-ninja/pull/878

**Full Changelog**: https://github.com/vitalik/django-ninja/compare/v1.0b2...v1.0rc

1.0b2

Warning: This is a pre-release of Django Ninja V1

This is the last change before 1.x release

This version introduces a new cleaner way to mark requests parameters


f.e.

Python
def some_form(request, data: Form[SomeSchema]):
...


instead of

Python
def some_form(request, data: SomeSchema = Form(...)):
...


This syntax looks cleaner/short and has the same code completion hints in popular editors.

On the other hand the old syntax is still supported so you can easy port your project to a newer django-ninja version



Bug changes and improvements
* Forbid extra by nofalx in https://github.com/vitalik/django-ninja/pull/863
* Add a test for list query params by marius-mather in https://github.com/vitalik/django-ninja/pull/852
* (docs) Fix typo in path-params.md by dipbazz in https://github.com/vitalik/django-ninja/pull/854
* (docs) Fix note to be admonitions in query-params.md by dipbazz in https://github.com/vitalik/django-ninja/pull/855

---

What's new in 1.x

- **async authentication** fully supported on all layers
- **CSRF is now automatic** on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- **Pydantic2** - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- Support for **`Annotated[]`** syntax
- allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change





New Contributors
* marius-mather made their first contribution in https://github.com/vitalik/django-ninja/pull/852
* dipbazz made their first contribution in https://github.com/vitalik/django-ninja/pull/854
* nofalx made their first contribution in https://github.com/vitalik/django-ninja/pull/863

**Full Changelog**: https://github.com/vitalik/django-ninja/compare/v1.0b1...v1.0b2

1.0b1

Warning: This is a pre-release of Django Ninja V1

On the other hand this is a beta release, so no more dramatic changes expected - mostly bug fixes

**There is only one major syntax thing that I'm still considering to add to 1.0 - shorter annotations - 746 - Please take a look and give your vote/thoughts**

---

What's new

- **async authentication** fully supported on all layers
- **CSRF is now automatic** on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- **Pydantic2** - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- Support for **`Annotated[]`** syntax
- allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change


Many thanks to contributors
* OtherBarry
* baseplate-admin
* vpoulailleau
* pavel-beaufort
* pawelngei
* Kristinus
* AlTosterino
* yasoob

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.