Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Fast to learn, fast to code, fast to run
Read more details here - https://django-ninja.dev/whatsnew_v1/
Or Watch here:
Django Ninja is a web framework for building APIs with Django and Python 3.6+ type hints.
Key features:
Documentation: https://django-ninja.dev
pip install django-ninja
In your django project next to urls.py create new api.py
file:
from ninja import NinjaAPI
api = NinjaAPI()
@api.get("/add")
def add(request, a: int, b: int):
return {"result": a + b}
Now go to urls.py
and add the following:
...
from .api import api
urlpatterns = [
path("admin/", admin.site.urls),
path("api/", api.urls), # <---------- !
]
That's it !
Now you've just created an API that:
/api/add
a
and b
Now go to http://127.0.0.1:8000/api/docs
You will see the automatic interactive API documentation (provided by Swagger UI or Redoc):
FAQs
Django Ninja - Fast Django REST framework
We found that django-ninja demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.