Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

python uuid sqlalchemy

from sqlalchemy.dialects.postgresql import UUID
from flask_sqlalchemy import SQLAlchemy
import uuid

db = SQLAlchemy()

class Foo(db.Model):
    id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
 
PREVIOUS NEXT
Tagged: #python #uuid #sqlalchemy
ADD COMMENT
Topic
Name
5+6 =