??? ??? ?? ?? ???? ? ?? ?? ?????? Node.js? Django???. ? ?? ?? ???? ??? ????? ??? ?? ???? ?? ??? ??? ? ? ????. ? ???? Node.js? Django? ???? ??? ???? ??? ??? ??? ? ??? ??????.
Node.js: JavaScript ???
Node.js? Chrome? V8 ??? ???? ??? JavaScript ??????. ?? ?? ???? ?? ??? JavaScript? ??? ? ???? ??? ? ??????, ??????? ? RESTful API? ?? ?????.
??:
??? ?? ???: Node.js? ??? ??? ?? I/O ??? ???? ???? ??? ??? ??? ?? ?????.
?JavaScript Everywhere: Node.js? ???? ?????? ??? ???? JavaScript? ???? ?? ??? ??? ???? ?? ? ????.
???? ???: Node.js?? ???? ??? ??? ??? ???? ?? ????? ??? ?????? ??? ?? ?? ? ????.
??:
?? ??: Node.js? ??? ???? ?? "?? ??"? ???? ??? ?? ?? ????? ? ???? ? ????.
??? ??: Node.js? ?? ??? ?? ?????? ???? ? ????.
???? ?????: Node.js? CPU ???? ???? ??? ??? ? ?? ?? ??? ????????? ???????.
const express = require('express');
const bodyParser = require('body-parser');
const ? = express();
const ?? = 3000;
app.use(bodyParser.json());
??? = [
{ ID: 1, ??: 'John Doe', ???: 'john@example.com' },
{ ID: 2, ??: 'Jane Doe', ???: 'jane@example.com' },
];
// ?? ??? ????
app.get('/users', (req, res) => {
res.json(???);
});
// ID? ??? ???
app.get('/users/:id', (req, res) => {
const id = parsInt(req.params.id);
const user = users.find((user) => user.id === id);
if (!user) {
res.status(404).json({ ???: '???? ?? ? ??' });
} ? ?? {
res.json(???);
}
});
// ? ??? ??
app.post('/users', (req, res) => {
const { ??, ??? } = req.body;
const newUser = { id: users.length 1, ??, ??? };
users.push(newUser);
res.json(newUser);
});
app.listen(port, () => {
console.log(??? ${port} ???? ???);
});
Django: Python ? ?????
Django? ???? ?? ?? ???? ?? ??? ? ???? ???? ??? ? ?? ?? Python ? ????????. ??? ? ??????? ???? ?? ????, ??? ? API? ?????.
??:
??? ??: Django? ??? ?? ?? ??? ???? ?????? ??? ?????? ? ??? ??????.
???: Django? ??? ?? ?????? ???? ???? ? ??????? ??????? ?????.
????: Django? ?? ???? ??? ??? ??? ????? ??????? ??? ? ??????? ??? ?????.
??:
??? ?? ??: Django? ??? ????? ?? ?? ??? ??? ?? ?????? ????? ? ????.
?????: Django? ???? ?????? ??????? ?? ???? ?????? ????? ? ??? ? ????.
???: Django? ?? ??? ? ????? ?? Node.js? ?? ??? ??? ? ????.
models.py:
django.db?? ?? ????
??? ???(models.Model):
id = models.AutoField(primary_key=True)
?? = ??.CharField(max_length=255)
??? = models.EmailField(unique=True)
serializers.py:
rest_framework ???? ?? ???
.models?? ??? ????
??? UserSerializer(serializers.ModelSerializer):
??? ??:
??=???
?? = ['ID', '??', '???']
views.py:
rest_framework ???? ??
Rest_framework.response ???? ??
??
Rest_framework.views?? APIView ????
.models?? ??? ????
.serializers?? UserSerializer ????
??? UserListView(APIView):
def get(??, ??):
??? = User.objects.all()
serializer = UserSerializer(???, ??=True)
??(serializer.data) ??
def post(self, request):
?????? = UserSerializer(data=request.data)
serializer.is_valid()? ??:
serializer.save()
??(serializer.data, status=status.HTTP_201_CREATED) ??
?? ??(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
urls.py:
django.urls ???? ????
?? . ? ????
urlpatterns = [
path('users/', views.UserListView.as_view()),
]
Node.js? Django? ?? ??? ??????? ???? ? ??? ? ? ?? ??? ??????? ?? ?????. ??? ?? ? ??? ???? ??? ??? ?? ??? ??? ??????.
? ??? Node.js? Django: ??? ??? ????? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

???? Python ?? ?? ?????? ?? ????, "??? ?????, ?? ??"? ???? ??? ??? ??? ?? ??? ?????. 1. ???? ?? ? ??? ?? ?????. ?? ???? ?? ??? ???? ??? ? ? ????. ?? ??, Spoke () ?? ???? ??? ??? ?? ??? ?? ????? ?? ??? ??? ????. 2. ???? ?? ???? ??? ??? ?????? Draw () ???? ???? ????? ?? ???? ?? ??? ???? ??? ???? ?? ?? ?? ??? ????? ?? ?? ????? ?? ?????. 3. Python ?? ???? ???????. ?? ???? ??? ???? ?? ???? ??? ????? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? ? ??? "?? ??"??????. 4. ???? ? ???? ?? ??? ?????

???? __iter __ () ? __next __ () ???? ???? ?????. ???? ??? ? ??? ????, ?? ???? ?? ??? ??? ???? ?????. 1. ???? ?? () ?? ? ??? ??? ???? ? ?? ??? ?? ? ?? ???? ??? ????. 2. ???? ?? ??? ???? ??? ???? ???? ???? ???? ?? ???? ?????. 3. ???? ???? ?? ??? ?? ? ? ? ??? ?? ? ???????? ? ? ??? ?? ??? ??? ???? ?? ? ? ???? ??????. ?? : ??? ?? ???? ??? ???? ????. ???? ?? ?? ? ??? ?????? ???? ? ?? ?? ? ? ????.

API ??? ??? ??? ?? ??? ???? ???? ???? ????. 1. Apikey? ?? ??? ?? ????, ????? ?? ?? ?? URL ?? ??? ?????. 2. Basicauth? ?? ???? ??? Base64 ??? ??? ??? ??? ????? ?????. 3. OAUTH2? ?? Client_ID ? Client_Secret? ?? ??? ?? ?? ?? ??? BearEtroken? ???????. 4. ?? ??? ???? ?? ?? ?? ???? ????? ???? ?? ?? ? ????. ???, ??? ?? ??? ??? ???? ?? ??? ???? ???? ?? ?????.

????? ??? ? ??? ??? ?? ??? ???? ??? zip () ??? ???? ????.? ??? ?? ??? ???? ?? ??? ?? ????. ?? ??? ???? ?? ?? itertools.zip_longest ()? ???? ?? ?? ? ??? ?? ? ????. enumerate ()? ???? ??? ???? ?? ? ????. 1.zip ()? ???? ????? ?? ??? ??? ??? ?????. 2.zip_longest ()? ???? ?? ??? ?? ? ? ???? ?? ? ????. 3. Enumental (Zip ())? ??? ??? ????? ??? ???? ???? ?? ???? ?? ? ????.

inpython, iteratorsareobjectsthatlowloppingthroughcollections __ () ? __next __ ()

Assert? ????? ???? ???? ?? ? ???? ??? ???? ??? ?? ?? ????. ??? ??? ??? ?? ??? ?????, ?? ?? ?? ??, ?? ?? ?? ?? ?? ?? ??? ????? ?? ?? ??? ?? ???? ??? ? ??? ??? ??? ??? ?? ???????. ?? ??? ???? ?? ?? ???? ?? ????? ??? ? ????.

typehintsinpythonsolvetheproblemombiguityandpotentialbugsindynamicallytypedcodebyallowingdevelopscifyexpectiontypes. theyenhancereadability, enablearylybugdetection ? improvetoomingsupport.typehintsareaddedusingaColon (:) forvariblesAndAramete

Python? ???? ????? ???? API? ???? Fastapi? ?????. ?? ??? ?? ????? ?????? ??? ??? ??? ???? ?? ? ? ????. Fastapi ? Asgi Server Uvicorn? ?? ? ? ????? ??? ??? ? ????. ??? ??, ?? ?? ?? ? ???? ?????? API? ???? ?? ? ? ????. Fastapi? ??? HTTP ??? ???? ?? ?? ? Swaggerui ? Redoc Documentation Systems? ?????. ?? ??? ?? URL ?? ??? ?? ? ??? ??, ?? ?? ??? ???? ???? ?? ?? ??? ??? ? ????. Pydantic ??? ???? ??? ?? ???? ???? ????? ? ??? ? ? ????.
