couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Johnson <>
Subject Re: create database from variable
Date Mon, 06 Dec 2010 02:07:49 GMT
Stupid mistake on my part. db must start with a lowercase alpha character.


Chris Johnson wrote:
> 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
> 20101201.114428
> Is there a way to create the database either directly using the actual 
> command or through variable substitution?
> Chris

View raw message