Skip to content

Instantly share code, notes, and snippets.

@gasbasd
gasbasd / pydantic_custom_validator.py
Last active August 7, 2023 15:15
pydantic custom ip validator
@field_validator('ip_address')
@classmethod
def ip_should_should_be_valid_ip_or_range(cls, v: str) -> str:
if not REGEX_DELLA_VITA:
raise ValueError('must be valid ip')
return v

Keybase proof

I hereby claim:

  • I am gasbasd on github.
  • I am gasbasd (https://keybase.io/gasbasd) on keybase.
  • I have a public key ASC-PqCmfXNRbI6tmZECzodqEOa0yRLddXA8HDfmtYeYOAo

To claim this, I am signing this object:

@gasbasd
gasbasd / keybase.md
Last active May 21, 2019 08:57
keybase.md

Keybase proof

I hereby claim:

  • I am gasbasd on github.
  • I am gasbasd (https://keybase.io/gasbasd) on keybase.
  • I have a public key ASB9fFr9xUpUGd4iMMY0bDt6qEPQ6a5OKcLKUJeEpzxlRQo

To claim this, I am signing this object:

@gasbasd
gasbasd / Git-flow_Cheat_Sheet.md
Last active February 21, 2018 14:56 — forked from denji/Git-flow_Cheat_Sheet.md
Git-flow Cheat Sheet

Initialize a Repository for git-flow

git flow init -d

(Omit -d if you want to select values other than the defaults.)

Features

Start a New Feature

This creates a new branch based on develop and switches to it: