Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Generative background images.

Project Description
GeoPatterns
===========

![](https://f.cloud.github.com/assets/1258/2056725/ede0785e-8aea-11e3-9e1e-45931b6e1c83.png)

Generate beautiful SVG patterns from a string. This is a Python-port of
[Jason Long][1]'s [Ruby library][2].

[1]: https://github.com/jasonlong/
[2]: https://github.com/jasonlong/geopatterns/

Installation
------------

GeoPatterns is installable via `pip`:

```shell
$ pip install geopatterns
```

Usage
-----

Create a new pattern by initializing `GeoPattern()` with a string and a
generator (the result of this string/generator pair is the above image).

```python
>>> from geopatterns import GeoPattern
>>> pattern = GeoPattern('A string for your consideration.', generator='xes')
```

Currently available generators are:

* `hexagons`
* `overlapping_circles`
* `overlapping_rings`
* `plaid`
* `plus_signs`
* `rings`
* `sinewaves`
* `squares`
* `triangles`
* `xes`

Get the SVG string:

```python
>>> print(pattern.svg_string)
u'<svg xmlns="http://www.w3.org/2000/svg" ...
```

Get the Base64-encoded string:

```python
>>> print(pattern.base64_string)
'PHN2ZyB4bWxucz0iaHR0cDov...
```

In the case of the Base64-encoded string, you can use it in CSS as follows:

```css
body {
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz...zdmc+');
}
```
Release History

Release History

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
geopatterns-0.1.2.tar.gz (1.7 kB) Copy SHA256 Checksum SHA256 Source Aug 22, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting