def new(request: NewRequest) -> Tag:
    """Creates a new observable in the database."""
    tag = Tag(
        name=request.name,
        default_expiration=request.default_expiration,
        created=datetime.datetime.now(datetime.timezone.utc),
        produces=request.produces,
        replaces=request.replaces,
    )
    new = tag.save()
    return new
Creates a new observable in the database.
core/web/apiv2/tag.py