Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 15, 2018 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/347e673ea2f2b8833096ee72de28e374 to your computer and use it in GitHub Desktop.
Save parzibyte/347e673ea2f2b8833096ee72de28e374 to your computer and use it in GitHub Desktop.
def obtener_bd():
host = "localhost"
puerto = "27017"
usuario = "parzibyte"
palabra_secreta = "hunter2"
base_de_datos = "tienda"
cliente = MongoClient("mongodb://{}:{}@{}:{}".format(usuario, palabra_secreta, host, puerto))
return cliente[base_de_datos]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment