Работаем с атрибутами объектов
Помимо привычного обращения к атрибутам объектов через точку, в Python есть 4 специальных функции: getattr, setattr, delattr и hasattr.
По названиям можно понять, что первые три отвечают за получение, установку и удаление атрибута. А последний проверяет, существует ли атрибут с указанным названием у объекта или нет.
Во всех функциях первыми двумя аргументами идут объект и название атрибута в виде строки. В setattr также нужно передать новое значение для атрибута.
На практике использование подобного — довольно редкий случай, но иногда может сильно выручить, так что берите на вооружение.
#python#tips
http://tutos.readthedocs.io/en/latest/source/ndg.html
due to the lacks of informations about deploying latests version of #django (1.6+) with latest #nginx (1.6+) using #gunicorn (18+) inside virtual environment of #python 3 (3.4+), it was really hard for a beginner like me to deploy a django project.
#python#django#MySQL
🐍
The Ultimate Django Series Part 3
Description
This course is the 3 part of a series. Build production-grade backends with industry best practices.A comprehensive, fun and highly-practical course that prepares you for the job
• Building an API to upload files
• Sending emails
• Running background tasks with Celery
• Scheduling periodic tasks
• Monitoring scheduled tasks
• Writing automated tests with PyTest
• Running performance tests with Locust
• Profiling with Silk
• Implementing caching with Redis
• Managing static assets
• Logging
• Managing development and production configuration
• Deploying to Heroku
• Django best practices
• And much, much more!
Author: Mosh Hamedani
Language: English
Duration: 4h+
🔗Link
-----
Main channel:@repo_science
Coupons: @freecoupons_reposcience
-----
#python#django#MySQL
🐍
The Ultimate Django Series Part2
Description
This course is the second part of a series. The first part covers the fundamentals of building websites with Python and Django. In this part, you'll learn:
• Fundamentals of RESTful APIs
• Working with class-based views
• Creating serializers
• Using mixins and generic views
• Generating routes with routers
• Filtering, searching, sorting, and pagination
• Django authentication system
• Creating custom User models
• Securing APIs with JSON Web Tokens (JWT)
• Using signals to decouple apps
• Troubleshooting common errors
• Applying best practices
• And much, much more!
Author: Mosh Hamedani
Language: English
Duration: 5h 41m
🔗Link
-----
Main channel:@repo_science
Coupons: @freecoupons_reposcience
-----
#python#django#MySQL
🐍
The Ultimate Django Series
Description
Master Django to Build Awesome Backends! This course is the first part of a series. In this part, you'll learn
• The fundamentals of web development
• Installing Django
• Creating and understanding Django projects
• Building reusable Django apps
• Building a data model for an e-commerce application
• Implementing generic relationships using Content Types Framework
• Setting up and using MySQL in your Django projects
• Creating and updating database tables using Django migrations
• Populating your database dummy data
• Querying and manipulating data using Django ORM
• Managing your application data using Django admin
• Django best practices
• And much, much more!
Author: Mosh Hamedani
Language: English
Duration: 4h 48m
Subtitle: Included
🔗Link
-----
Main channel:@repo_science
Coupons: @freecoupons_reposcience
-----
#python#docker#django
😎
Django Rest Framework with Docker A Practical Guide
In this tutorial you will learn:
- How to create APIs with Django Rest Framework
- Use Docker
- Create protected routes
- Login with HttpOnly Cookies
- Use APIViews, ViewSets, Generic API Views
- Authorize users for different routes
- Upload Images
- Export CSV files
🔗Link
-----
Main channel:@repo_science
Coupons:@freecoupons_reposcience
-----
# #Python 3.3+ has a std
# lib module for displaying
# #tracebacks even when Python
# "dies", e.g with a #segfault:
import faulthandler
faulthandler.enable()
# Can also be enabled with
# "python -X faulthandler"
# from the command line.
# Learn more here:
# https://docs.python.org/3/library/faulthandler.html
http://www.evontech.com/what-we-are-saying/entry/python-36-adds-new-secrets-module-for-robust-account-and-password-security.html
#Python 3.6 adds New secrets Module for #Robust_Account and #Password_Security
http://mdp.cdm.depaul.edu/DePy2016
3rd Annual #Conference on #Python applications in #Data_Analysis, #Machine_Learning, and Web
May 6, 7
DePaul University - Room LL105
14 E Jackson Blvd
Chicago IL 60604, USA