TileStache.S3
index

Caches tiles to Amazon S3.
 
Requires boto (2.0+):
  http://pypi.python.org/pypi/boto
 
Example configuration:
 
  "cache": {
    "name": "S3",
    "bucket": "<bucket name>",
    "access": "<access key>",
    "secret": "<secret key>"
  }
 
S3 cache parameters:
 
  bucket
    Required bucket name for S3. If it doesn't exist, it will be created.
 
  access
    Required access key ID for your S3 account.
 
  secret
    Required secret access key for your S3 account.
 
  use_locks
    Optional boolean flag for whether to use the locking feature on S3.
    True by default. A good reason to set this to false would be the
    additional price and time required for each lock set in S3.
 
Access and secret keys are under "Security Credentials" at your AWS account page:
  http://aws.amazon.com/account/

 
Classes
       
Cache

 
class Cache
     Methods defined here:
__init__(self, bucket, access, secret, use_locks=True)
lock(self, layer, coord, format)
Acquire a cache lock for this tile.
 
Returns nothing, but blocks until the lock has been acquired.
Does nothing and returns immediately if `use_locks` is false.
read(self, layer, coord, format)
Read a cached tile.
remove(self, layer, coord, format)
Remove a cached tile.
save(self, body, layer, coord, format)
Save a cached tile.
unlock(self, layer, coord, format)
Release a cache lock for this tile.

 
Functions
       
strptime(...)
strptime(string, format) -> struct_time
 
Parse a string to a time tuple according to a format specification.
See the library reference manual for formatting codes (same as strftime()).
tile_key(layer, coord, format)
Return a tile key string.
time(...)
time() -> floating point number
 
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.