Skip to content

Instantly share code, notes, and snippets.

@flossypurse
Last active January 31, 2025 23:34
Show Gist options
  • Select an option

  • Save flossypurse/c9990c8778310297da7910bca552c478 to your computer and use it in GitHub Desktop.

Select an option

Save flossypurse/c9990c8778310297da7910bca552c478 to your computer and use it in GitHub Desktop.
Example function that inserts a user into a database
def _create_user(user: int):
conn.execute("INSERT INTO users (value) VALUES (?)", (user,))
conn.commit()
print(f"User {user} has been inserted to database")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment