Skip to main content

An API for reading and manipulating Starmade game data

Project description

# Starmadepy v0.1

A Python library for manipulating Starmade game data.

## Overview

Starmadepy is a simple python library that makes parsing and manipulating Starmade game data easy. As this project is fairly new, the only file type that is currently supported is the `.smtpl`, or **Starmade Template** file type.

[Docs](http://starmadepy.readthedocs.org/en/latest/)


## Example

Maybe you created a really nice component that utilizes blocks, wedges, corners, pentas, and tetras in a couple different colors and you'd like to generate some copies of this template in different colors.

The following code will open a template file, select all the blocks with the color grey and then replace them with orange.

```python
from starmadepy import starmade

# Loads a template file named sometemplatefile.smtpl
# Replaces all grey colored blocks, with orange equivalents

template = starmade.Template.fromSMTPL('sometemplatefile.smtpl')
template.replace({'color': 'grey'}, {'color': 'orange'})
template.save('outtemplatefile.smtpl')
```

![Converted Template](docs/img/tutorial1.png)

## Installation

It is recommended that you use virtualenv or the virtualenvwrapper.

pip install starmadepy


## Contributing

Fork, clone, `pip install -r requirements.txt` and run the tests with `py.test`
Full guide in the [docs](http://starmadepy.readthedocs.org/en/latest/contributing/)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

starmadepy-0.1.6-py2-none-any.whl (17.0 kB view details)

Uploaded Python 2

File details

Details for the file starmadepy-0.1.6-py2-none-any.whl.

File metadata

File hashes

Hashes for starmadepy-0.1.6-py2-none-any.whl
Algorithm Hash digest
SHA256 1850ec4bf6a4690793574db803ecc608330ea019822637d41f646ef5cbac5598
MD5 95577176712eb924f8ea143841d5b776
BLAKE2b-256 e5f8967d07f45c91a2bd946d9a4cdd244a24152f449dc7975bac297073f3392f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page