couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Johnson <>
Subject create database from variable
Date Wed, 01 Dec 2010 20:33:42 GMT
I am relatively new to couch and have tried searching for the answer to 
this, but have not been very successful. I currently use python for the 
bulk of my  scripting and would like to start using couch for the 
database. The challenge I am up against is that I am trying to create a 
database based on a variable within a python script. I have tried using 
the couchdb library and I have not been successful in using it with 
variable substitution.

As an example, I would like to create a new database each time the 
script is run. The database name will be a time stamp
 >>>db_name = strftime("%Y%m%d.%H%M%S")
 >>>print db_name

Is there a way to create the database either directly using the actual 
command or through variable substitution?


View raw message