High-performance load testing tool, written in #go.
Features:
- Protocol Agnostic - Currently supporting HTTP, HTTPS, HTTP/2. Other protocols are on the way.
- Scenario-Based - Create your flow in a JSON file. Without a line of code!
- Different Load Types - Test your system's limits across different load types.
https://github.com/ddosify/ddosify
Features:
- Protocol Agnostic - Currently supporting HTTP, HTTPS, HTTP/2. Other protocols are on the way.
- Scenario-Based - Create your flow in a JSON file. Without a line of code!
- Different Load Types - Test your system's limits across different load types.
https://github.com/ddosify/ddosify
I have great news! We are going to have another GitHub meetup with awesome guests:
- Yuri Selivanov, CPython core dev, asyncio co-author
- Mike McQuaid, brew (talk will be translated 🇺🇸 -> 🇷🇺)
- Nikita Sobolev (dry-python and mypy core) (it's me!)
We are going to speak about open-source and everything around it.
Join us! We invite everyone, but the content will be in 🇷🇺 only 🙂
Tuesday, February 22, 2022 (Today)
5:00 PM to 6:00 PM MSK
https://www.meetup.com/github-planeta/events/281817625/
- Yuri Selivanov, CPython core dev, asyncio co-author
- Mike McQuaid, brew (talk will be translated 🇺🇸 -> 🇷🇺)
- Nikita Sobolev (dry-python and mypy core) (it's me!)
We are going to speak about open-source and everything around it.
Join us! We invite everyone, but the content will be in 🇷🇺 only 🙂
Tuesday, February 22, 2022 (Today)
5:00 PM to 6:00 PM MSK
https://www.meetup.com/github-planeta/events/281817625/
Meetup
GitHub Planeta: по-русски Open Source Edition, вт, 22 февр. 2022 г., 17:00 | Meetup
Тема : Open-Source Software, его поддержка, устойчивость и GitHub.
Наша встреча состоится 22 Февраля с 17:00 по московскому времени. Наши ведущие хабберы расскажут вам о но
Наша встреча состоится 22 Февраля с 17:00 по московскому времени. Наши ведущие хабберы расскажут вам о но
❤1
Subscribe to the official GitHub telegram community in Russia: https://xn--r1a.website/githubplaneta 🚀
We will share future events there.
We will share future events there.
Telegram
GitHub Планета
Наши встречи будут проходить каждый третий вторник каждого месяца в 19:00 по Москве. Митап страница https://www.meetup.com/ru-RU/github-planeta
We are starting a free course about typing in Python!
We will cover:
- Runtime implementation of
- How to write mypy plugins?
- How to write type-safe code in Python using advanced techniques, such as: type level programming, dependent types, monads, phantom types and many more!
3 lectures + optional homework.
11 oct - 31 oct 2022
Language: ru
Register, while we still have open seats left!
https://education.borshev.com/python-typing
We will cover:
- Runtime implementation of
typing.py and when it can be helpful- How to write mypy plugins?
- How to write type-safe code in Python using advanced techniques, such as: type level programming, dependent types, monads, phantom types and many more!
3 lectures + optional homework.
11 oct - 31 oct 2022
Language: ru
Register, while we still have open seats left!
https://education.borshev.com/python-typing
tough-dev.school
Типизация в Python
Hi 👋
We continue our tradition of creating inspiring and content-heavy courses for Python developers.
This time we decided to focus on testing. We all know that sometimes people struggle with tests, because there are so many things to get right:
- Frameworks
- Mocking
- Data generation
- Flakyness
- Speed
- Different levels and kinds of tests
Sounds hard? We are here to help!
We will start with just one free webinar, where we will cover the most essential part. But, we will have more coming soon, stay tuned!
We even created a rather big project to be tested as a part of the homework for the later parts of this course. Check it out: https://github.com/tough-dev-school/python-testing-homework
Date: 01.03.2023
Time: 18:00 GMT+3
Language: ru
Register via our telegram bot to get a translation link: @tough_dev_bot
And prepare your questions :)
See you!
We continue our tradition of creating inspiring and content-heavy courses for Python developers.
This time we decided to focus on testing. We all know that sometimes people struggle with tests, because there are so many things to get right:
- Frameworks
- Mocking
- Data generation
- Flakyness
- Speed
- Different levels and kinds of tests
Sounds hard? We are here to help!
We will start with just one free webinar, where we will cover the most essential part. But, we will have more coming soon, stay tuned!
We even created a rather big project to be tested as a part of the homework for the later parts of this course. Check it out: https://github.com/tough-dev-school/python-testing-homework
Date: 01.03.2023
Time: 18:00 GMT+3
Language: ru
Register via our telegram bot to get a translation link: @tough_dev_bot
And prepare your questions :)
See you!
GitHub
GitHub - tough-dev-school/python-testing-homework: Homework for our "Testing" course
Homework for our "Testing" course. Contribute to tough-dev-school/python-testing-homework development by creating an account on GitHub.
👍1
I am starting a full-featured "Testing in Python" course.
https://education.borshev.com/python-testing
I've committed to / co-authored / authored multiple popular tools in Python testing world, including:
So, I know about the testing internals pretty well.
I also know how to keep your tests readable and fast.
If you want to learn directly from me (https://github.com/sobolevn/), consider registering for our course: https://education.borshev.com/python-testing
Details:
- 3 webinars once a week
- 1 for free as a welcome gift
- 2 big and complex homeworks based on https://github.com/tough-dev-school/python-testing-homework with p2p / my reviews
- Friendly community :)
Starting date: 20.03.2023
Language: ru
Register https://education.borshev.com/python-testing
I also have a 10% off with
See you! 🧡
https://education.borshev.com/python-testing
I've committed to / co-authored / authored multiple popular tools in Python testing world, including:
pytest (and plugins), unittest, mock, mimesis (and other data-generation tools), hypothesis, django-test-migrations, mutmut, etc, and etc.So, I know about the testing internals pretty well.
I also know how to keep your tests readable and fast.
If you want to learn directly from me (https://github.com/sobolevn/), consider registering for our course: https://education.borshev.com/python-testing
Details:
- 3 webinars once a week
- 1 for free as a welcome gift
- 2 big and complex homeworks based on https://github.com/tough-dev-school/python-testing-homework with p2p / my reviews
- Friendly community :)
Starting date: 20.03.2023
Language: ru
Register https://education.borshev.com/python-testing
I also have a 10% off with
Nick promo code.See you! 🧡
Hi 👋
We are happy to announce the second edition of our long-awaited testing course!
The second edition will be even more advanced and feature-full 🙂
We all know that sometimes people struggle with tests, because there are so many things to get right:
- Frameworks
- Mocking
- Data generation
- Flakyness
- Speed
- Different levels and kinds of tests
Sounds hard? We are here to help!
We will start with just one free webinar, where we will cover the most essential part, it is a foundation fore every developer who writes tests.
We even created a rather big project to be tested as a part of the homework for the later parts of this course. Check it out: https://github.com/tough-dev-school/python-testing-homework
Date: 06.09.2023
Time: 19:00 GMT+3
Language: ru
Register via our telegram bot to get a translation link: @tough_dev_bot
And prepare your questions 🙂
The course itself will start on 11.09
https://education.borshev.com/python-testing
See you there! 👍️️
We are happy to announce the second edition of our long-awaited testing course!
The second edition will be even more advanced and feature-full 🙂
We all know that sometimes people struggle with tests, because there are so many things to get right:
- Frameworks
- Mocking
- Data generation
- Flakyness
- Speed
- Different levels and kinds of tests
Sounds hard? We are here to help!
We will start with just one free webinar, where we will cover the most essential part, it is a foundation fore every developer who writes tests.
We even created a rather big project to be tested as a part of the homework for the later parts of this course. Check it out: https://github.com/tough-dev-school/python-testing-homework
Date: 06.09.2023
Time: 19:00 GMT+3
Language: ru
Register via our telegram bot to get a translation link: @tough_dev_bot
And prepare your questions 🙂
The course itself will start on 11.09
https://education.borshev.com/python-testing
See you there! 👍️️
GitHub
GitHub - tough-dev-school/python-testing-homework: Homework for our "Testing" course
Homework for our "Testing" course. Contribute to tough-dev-school/python-testing-homework development by creating an account on GitHub.
Forwarded from Никита Соболев
всем привет! я очень долго обещал сделать бесплатный курс на ютюбе для всех желающих. и вот я, наконец, начал его делать! 🎉
встречайте: https://www.youtube.com/@sobolevn
уникальность формата в том, что рассматриваю одну узкую тему с трех уровней сложности: junior, middle, senior. так что, контент должен быть интересным для всех уровней Python разработчиков!
обратите внимание, что курс не для тех, кто идет учить питон с нуля. он для тех, кто уже хоть немного знает, как погромировать на питоне.
важные ссылки:
- все материалы курса: https://github.com/sobolevn/the-best-...
- мой гитхаб: https://github.com/sobolevn
- поддержать мою работу: https://boosty.to/sobolevn
- вступить в наше новое глобальное сообщество: https://discord.python.ru
буду рад обратной связи!
в ближайших планах:
- починить звук и свет
- избавиться от слова "интерсный" в описании примерно всего 😄
- сделать много новых видео по разным темам
встречайте: https://www.youtube.com/@sobolevn
уникальность формата в том, что рассматриваю одну узкую тему с трех уровней сложности: junior, middle, senior. так что, контент должен быть интересным для всех уровней Python разработчиков!
обратите внимание, что курс не для тех, кто идет учить питон с нуля. он для тех, кто уже хоть немного знает, как погромировать на питоне.
важные ссылки:
- все материалы курса: https://github.com/sobolevn/the-best-...
- мой гитхаб: https://github.com/sobolevn
- поддержать мою работу: https://boosty.to/sobolevn
- вступить в наше новое глобальное сообщество: https://discord.python.ru
буду рад обратной связи!
в ближайших планах:
- починить звук и свет
- избавиться от слова "интерсный" в описании примерно всего 😄
- сделать много новых видео по разным темам
👍10❤2
Находки в опенсорсе pinned «всем привет! я очень долго обещал сделать бесплатный курс на ютюбе для всех желающих. и вот я, наконец, начал его делать! 🎉 встречайте: https://www.youtube.com/@sobolevn уникальность формата в том, что рассматриваю одну узкую тему с трех уровней сложности:…»
привет!
в среду 10 июля играем в IT-шную опенсорсную настолку Ship IT в хорошей компании!
ссылка на игру: https://github.com/sobolevn/ship-it-boardgame
в программе:
- душные ITшные шутки
- специальный набор карт для взаимодействия со зрителями
- конкурс на самый смешную шутку в комментариях (приз: физическая настолка!)
участвуют:
- Аня Курносова Pytup: https://xn--r1a.website/+Bz-uVcXh4Jk1YTNi
- Алексей Пирогов https://github.com/astynax
- Денис Пушкарев https://github.com/zloirock
- Паша Коршиков https://xn--r1a.website/tech_meetup
- Олег Чирухин https://github.com/olegchir
ведущий: Никита Соболев https://github.com/sobolevn
начало: 19:30 по МСК
ссылка на трансляцию: https://www.youtube.com/watch?v=pR8tQaoOitc
в среду 10 июля играем в IT-шную опенсорсную настолку Ship IT в хорошей компании!
ссылка на игру: https://github.com/sobolevn/ship-it-boardgame
в программе:
- душные ITшные шутки
- специальный набор карт для взаимодействия со зрителями
- конкурс на самый смешную шутку в комментариях (приз: физическая настолка!)
участвуют:
- Аня Курносова Pytup: https://xn--r1a.website/+Bz-uVcXh4Jk1YTNi
- Алексей Пирогов https://github.com/astynax
- Денис Пушкарев https://github.com/zloirock
- Паша Коршиков https://xn--r1a.website/tech_meetup
- Олег Чирухин https://github.com/olegchir
ведущий: Никита Соболев https://github.com/sobolevn
начало: 19:30 по МСК
ссылка на трансляцию: https://www.youtube.com/watch?v=pR8tQaoOitc
GitHub
GitHub - sobolevn/ship-it-boardgame: Social and fun boardgame about IT. Best with 🍻
Social and fun boardgame about IT. Best with 🍻. Contribute to sobolevn/ship-it-boardgame development by creating an account on GitHub.
👍3
Находки в опенсорсе pinned «привет! в среду 10 июля играем в IT-шную опенсорсную настолку Ship IT в хорошей компании! ссылка на игру: https://github.com/sobolevn/ship-it-boardgame в программе: - душные ITшные шутки - специальный набор карт для взаимодействия со зрителями - конкурс…»
Привет!
Давайте знакомиться заново.
Меня зовут Никита, я опенсорс разработчик: https://github.com/sobolevn
Я люблю компиляторы, тайпчекеры, системы тестирования и статические анализаторы разных видов.
Я разрабатываю множество инструментов, которыми вы уже 100% пользуетесь.
Концепция канала поменялась. О чем тут теперь будет?
- Больше я не буду закидывать безличную информацию о других опенсорс проектах, но буду больше рассказывать про те, где я принимаю активное участие: CPython, mypy, typeshed, Django и тд
- Буду делиться видео своих и чужих интересных докладов
- Публиковать материалы для "Лучшего курса по Питону": https://www.youtube.com/@sobolevn
- Рассказывать про интересные проекты, которые мне встретились в опенсорсе, прикоснуться к которым действительно удалось
- Делиться знаниями про сложные и интересные штуки в моей работе :)
Поддержать мою работу можно тут: https://boosty.to/sobolevn
Давайте знакомиться заново.
Меня зовут Никита, я опенсорс разработчик: https://github.com/sobolevn
Я люблю компиляторы, тайпчекеры, системы тестирования и статические анализаторы разных видов.
Я разрабатываю множество инструментов, которыми вы уже 100% пользуетесь.
Концепция канала поменялась. О чем тут теперь будет?
- Больше я не буду закидывать безличную информацию о других опенсорс проектах, но буду больше рассказывать про те, где я принимаю активное участие: CPython, mypy, typeshed, Django и тд
- Буду делиться видео своих и чужих интересных докладов
- Публиковать материалы для "Лучшего курса по Питону": https://www.youtube.com/@sobolevn
- Рассказывать про интересные проекты, которые мне встретились в опенсорсе, прикоснуться к которым действительно удалось
- Делиться знаниями про сложные и интересные штуки в моей работе :)
Поддержать мою работу можно тут: https://boosty.to/sobolevn
GitHub
sobolevn - Overview
sobolevn has 616 repositories available. Follow their code on GitHub.
🔥93👍27❤12👏6😱1🙏1
Находки в опенсорсе pinned «Привет! Давайте знакомиться заново. Меня зовут Никита, я опенсорс разработчик: https://github.com/sobolevn Я люблю компиляторы, тайпчекеры, системы тестирования и статические анализаторы разных видов. Я разрабатываю множество инструментов, которыми вы уже…»
А еще я включил реакции и комментарии, наслаждайтесь! Правила: https://gist.github.com/sobolevn/d9a598a23e6bb89e51ada71033e9103f
Gist
@opensource_findings: правила
@opensource_findings: правила. GitHub Gist: instantly share code, notes, and snippets.
❤62🔥34🥰10💩5😱4🎉4👏3🤩3🕊2🤯1😢1
И сразу пример нового контента.
За последние два дня добавил поддержку двух новых типов в hypothesis:
- ReadOnly: https://github.com/HypothesisWorks/hypothesis/pull/4072
- LiteralString: https://github.com/HypothesisWorks/hypothesis/pull/4075
Что такое hypothesis? Такой фреймворк для тестирования на основе идеи Property-Based Testing: когда вы тестируете не конкретные значения, а целые законы или свойства вашей системы.
Например:
Что очень удобно,
Hypothesis является частью CI самого CPython: https://github.com/python/cpython/blob/main/Lib/test/support/hypothesis_helper.py и является очень крутой технологией.
На ее основе можно делать безумные вещи: https://sobolevn.me/2021/02/make-tests-a-part-of-your-app
За последние два дня добавил поддержку двух новых типов в hypothesis:
- ReadOnly: https://github.com/HypothesisWorks/hypothesis/pull/4072
- LiteralString: https://github.com/HypothesisWorks/hypothesis/pull/4075
Что такое hypothesis? Такой фреймворк для тестирования на основе идеи Property-Based Testing: когда вы тестируете не конкретные значения, а целые законы или свойства вашей системы.
Например:
import datetime as dt
import attrs
@attrs.define
class User:
# ...
joined_at: dt.datetime
last_loggined_at: dt.datetime
def create_our_user() -> User:
... # your business logic
# Testing:
from hypothesis import given, strategies as st
@given(st.builds(create_our_user))
def test_user_login_cannot_be_after_created(user: User) -> None:
assert user.last_loggined_at >= user.joined_at
Что очень удобно,
st.from_type(...) может просто по аннотациям генерировать вам объекты; потому поддержка новых типов - всегда полезна.Hypothesis является частью CI самого CPython: https://github.com/python/cpython/blob/main/Lib/test/support/hypothesis_helper.py и является очень крутой технологией.
На ее основе можно делать безумные вещи: https://sobolevn.me/2021/02/make-tests-a-part-of-your-app
GitHub
GitHub - HypothesisWorks/hypothesis: The property-based testing library for Python
The property-based testing library for Python. Contribute to HypothesisWorks/hypothesis development by creating an account on GitHub.
👍36😱8🔥3
Одна из самых проблемных частей CPython – вызов Python кода из С.
Делать такое нужно довольно регулярно. Примеры использований:
- Обращение к магическим методам объектов:
- Вызов переданных Python callback'ов:
- Создание новых объектов:
Но, такое всегда нужно делать осторожно. Буквально, почти весь стейт внутри C может измениться после вызова любого Python кода!
Например, такой простой код вызовет
Мне нравится править такое, одно из самых интересных направлений:
- https://github.com/python/cpython/pull/120442
- https://github.com/python/cpython/pull/120303
А вот как такое находить?
1. Внутри CPython есть свой фаззер: https://github.com/python/cpython/tree/main/Modules/_xxtestfuzz Иногда он находит код, который крашит какой-то кусок. Было довольно много полезных срабатываний
2. Есть отдельные инструменты и команды по всему миру, кто заинтересован в разметке исходников CPython и выявлении таких проблем статически
3. Собирать баги от пользователей :(
Если видите crash – бегом репортить багу!
Делать такое нужно довольно регулярно. Примеры использований:
- Обращение к магическим методам объектов:
PyObject_RichCompare, PyObject_GetIter, PyIter_Next, PyObject_GetItem, и тд- Вызов переданных Python callback'ов:
PyObject_Call*, PyObject_Vectorcall, и тд- Создание новых объектов:
PyObject_NewНо, такое всегда нужно делать осторожно. Буквально, почти весь стейт внутри C может измениться после вызова любого Python кода!
Например, такой простой код вызовет
[1] 88503 segmentation fault python на версиях <3.12.5
class evil:
def __init__(self, lst):
self.lst = lst
def __iter__(self):
yield from self.lst
self.lst.clear()
lst = list(range(10))
lst[::-1] = evil(lst)
Мне нравится править такое, одно из самых интересных направлений:
- https://github.com/python/cpython/pull/120442
- https://github.com/python/cpython/pull/120303
А вот как такое находить?
1. Внутри CPython есть свой фаззер: https://github.com/python/cpython/tree/main/Modules/_xxtestfuzz Иногда он находит код, который крашит какой-то кусок. Было довольно много полезных срабатываний
2. Есть отдельные инструменты и команды по всему миру, кто заинтересован в разметке исходников CPython и выявлении таких проблем статически
3. Собирать баги от пользователей :(
Если видите crash – бегом репортить багу!
GitHub
gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` by sobolevn · Pull Request #120442 · python/cpython
Thank a lot to @MechanicPig for the reproducer and detailed bug description.
Issue: Array out of bounds assignment in list_ass_subscript #120384
Issue: Array out of bounds assignment in list_ass_subscript #120384
🔥35👍5😱3👏2
История одного PR #prhistory
Некоторое время назад я добавил в mypy поддержку
PR большой, его будут смотреть еще некоторое время. Но, о самых важных принципах рассказать можно уже сейчас.
1. Что такое
PEP: https://peps.python.org/pep-0705
По сути, он запрещает такой код:
Крайне полезная вещь для бизнес логики.
2.
Однако, он был добавлен в
Так что пользоваться
3. Как устроен
Основная сложность, что разные special form'ы могут идти вместе:
-
-
- и тд в любых комбинациях
Внутри
4. Какие делатали типизации важны?
Помимо очевидного запрета на изменение
Пример:
Но почему?
Потому что тело функции
Таким образом – мы могли бы допустить ошибку и изменить "неизменяемый" ключ.
Ждём? 🤔
Некоторое время назад я добавил в mypy поддержку
ReadOnly special form для TypedDict: https://github.com/python/mypy/pull/17644PR большой, его будут смотреть еще некоторое время. Но, о самых важных принципах рассказать можно уже сейчас.
1. Что такое
ReadOnly?PEP: https://peps.python.org/pep-0705
По сути, он запрещает такой код:
from typing import ReadOnly, TypedDict
class User(TypedDict):
username: ReadOnly[str] # you cannot change the value of `user['username']`
user: User = {'username': 'sobolevn'}
user['username'] = 'changed' # type error! username is read-only
Крайне полезная вещь для бизнес логики.
2.
ReadOnly был добавлен в Python в версию 3.13 мной некоторое время назад: https://github.com/python/cpython/pull/116350Однако, он был добавлен в
typing_extensions еще раньше: https://github.com/python/typing_extensions/commit/0b0166d649cebcb48e7e208ae5da36cfab5965feТак что пользоваться
typing_extensions.ReadOnly можно будет как только выйдет новая версия mypy с поддержкой данной special form.3. Как устроен
ReadOnly?Основная сложность, что разные special form'ы могут идти вместе:
-
username: ReadOnly[Required[str]]-
age: NotRequired[Annotated[ReadOnly[int], Validate(min=18, max=120)]]- и тд в любых комбинациях
Внутри
TypedDict появились специальные атрибуты: __readonly_keys__ и __mutable_keys__:
>>> from typing import TypedDict, ReadOnly
>>> class User(TypedDict):
... username: ReadOnly[str]
... age: int
...
>>> User.__readonly_keys__
frozenset({'username'})
>>> User.__mutable_keys__
frozenset({'age'})
4. Какие делатали типизации важны?
Помимо очевидного запрета на изменение
ReadOnly ключей, нужно помнить, про отношение подтипов.Пример:
User = TypedDict('User', {'username': ReadOnly[str]})
MutableUser = TypedDict('MutableUser', {'username': str})
def accepts_user(user: User): ...
def accepts_mutable_user(user: MutableUser): ...
ro_user: User
mut_user: MutableUser
# MutableUser является подвидом User, но User не является подвидом MutableUser
accepts_user(mut_user) # ok
accepts_mutable_user(ro_user) # error: expected: MutableUser, given: User
Но почему?
Потому что тело функции
accepts_mutable_user может выглядеть как-то так:
def accepts_mutable_user(user: MutableUser):
user['username'] = ''
Таким образом – мы могли бы допустить ошибку и изменить "неизменяемый" ключ.
Ждём? 🤔
GitHub
Add `ReadOnly` support for TypedDicts by sobolevn · Pull Request #17644 · python/mypy
Refs #17264
I will add docs in a separate PR.
I will add docs in a separate PR.
🔥49👍14🤔3👎1😱1
