Skip to content

Instantly share code, notes, and snippets.

View radzhome's full-sized avatar

Rad W radzhome

  • Ottawa
View GitHub Profile
@radzhome
radzhome / phone.py
Created February 25, 2020 18:43
format_phone_number
import re
import logging
def phone_format(phone_number, raise_exception=False):
"""
Cleans up formatting for a phone number
format_phone_number
:param raise_exception: bool, throw an exception or return original value
:param phone_number: inputted raw phone
:return: str formatted_phone_number
@radzhome
radzhome / json_schema_to_django_model.py
Last active May 9, 2024 20:16
Converts json schema to django models.py
"""
Json Schema to Django Model
"""
import json
import argparse
import logging
import os
def determine_model_name(model_id=None, filename=None):