couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: create database from variable
Date Sun, 05 Dec 2010 21:45:07 GMT
Maybe you can show us what you tried that didn't work?
Perhaps it's just that a period ('.') is not allowed in a database name.

On Wed, Dec 1, 2010 at 12:33, Chris Johnson <csj790@yahoo.com> 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
>
>
>

Mime
View raw message