Автоматическое форматирование Python кода с помощью Black
Сегодня мы расскажем вам о незаменимом инструменте для поддержания структуры и читаемости вашего Python кода - Black. Black - это автоматический форматтер кода, который помогает вам избавиться от несогласованных стилей и выравнивает ваш код согласно официальным рекомендациям PEP 8.
Что такое Black?
Black - это инструмент для автоматического форматирования Python кода, разработанный с учетом строгих принципов. Он призван обеспечить единообразие в структуре кода и упростить его чтение для всех участников проекта.
Преимущества использования Black:
- Единообразие: Black гарантирует, что ваш код будет соответствовать стандартам PEP 8, что делает его более читаемым и понятным.
- Автоматизация:Black автоматически форматирует код, что позволяет избежать рутинных задач по выравниванию и форматированию.
- Интеграция:Black легко интегрируется в ваш рабочий процесс с помощью популярных инструментов разработки, таких как VSCode, PyCharm и других.
- Кастомизация: Вы можете настроить некоторые параметры Black, чтобы адаптировать его к вашим потребностям.
Как использовать Black?
Для начала, установите Black с помощью pip:
pip install black
Затем, вы можете использовать Black для форматирования вашего кода следующим образом:
black your_python_file.py
Black автоматически примет ваш код и приведет его к согласованному стилю. Вы также можете настроить некоторые аспекты форматирования, чтобы сделать его идеально подходящим для вашего проекта.
#python#Black#форматирование#код#PEP8
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