Blueprint editing tools for Dyson Sphere Program
Project description
Dyson Sphere Program blueprint tool, python bindings.
Features
- Load and save blueprint files.
- Replace blueprint items and recipes (partial).
- Upgrade buildings.
- Print blueprint info.
Example usage
import dspbp
from dspbp import DSPItem
data = open("my_blueprint.txt", "rb").read()
bp = dspbp.load(data)
replacement = {
DSPItem.IronOre: DSPItem.CopperOre,
DSPItem.IronIngot: DSPItem.CopperIngot,
}
bp.replace_item(replacement)
open("edited_blueprint.txt", "wb").write(dspbp.save(bp))
Brief reference
PyBlueprint
Blueprint class.
DSPItem
DSP item enum. Use dir(DSPItem) to get a list of all item types.
DSPRecipe
DSP recipe enum. Use dir(DSPRecipe) to get a list of all recipes.
dspbp.load(data: bytes) -> PyBlueprint
Load a blueprint from a bytes object.
dspbp.save(bp: PyBlueprint) -> bytes
Turn a blueprint into a bytes object.
PyBlueprint.icon_text: str
Icon text property. Use it to set blueprint text under the icons.
PyBlueprint.get_description(self) -> str
Get blueprint description.
PyBlueprint.replace_item(self, r: dict[DSPItem, DSPItem])
Replace items in the blueprint. Any item with a key in r gets replaced with a
corresponding value.
Supports belt labels, logistic station slots and item icons.
TODO: inserter filters, splitter filters, traffic monitors.
PyBlueprint.replace_item(self, r: dict[DSPRecipe, DSPRecipe])
Replace recipes in the blueprint. Any recipe with a key in r gets replaced
with a corresponding value.
PyBlueprint.replace_both(self, r: dict[DSPItem, DSPItem])
Replace both items and recipes. Items get converted into a most basic recipe.
PyBlueprint.replace_building(self, r: dict[DSPItem, DSPItem])
Upgrade and downgrade buildings.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dspbp-0.1.1.tar.gz.
File metadata
- Download URL: dspbp-0.1.1.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5750eb2ff705bd8fa21f27dbb36e73bb0e4280a0c5b538f5dd3a995aa39c5fbd
|
|
| MD5 |
57fea9f6be9a5fbd65a9ed5e99eb30db
|
|
| BLAKE2b-256 |
c2d5d2750352a43c7d41a633e0a50931529d151ba287a86263408c9fca139fd9
|
File details
Details for the file dspbp-0.1.1-pp39-pypy39_pp73-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 281.4 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7283939eb2004eb6592d0d8e5695481e0994e6ccad7b5a8f7ba3e4dbb30386c9
|
|
| MD5 |
c72f57a2352647590dba6b06cbaa2306
|
|
| BLAKE2b-256 |
82235433d3c8a1d167cc1705ca9f4dec9c8af6d4f8208dcb5f3902fc0d985c98
|
File details
Details for the file dspbp-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bacfba6ffd1bbd4e82433d64b6537f2086edadf1a4925c1aa32ef65c5f7b3d62
|
|
| MD5 |
81e7c3e3775a44dc171ac5e68fd76a3c
|
|
| BLAKE2b-256 |
d19862682817f99338a775b26925979b980444c1c925368a7ea8c59df8f01769
|
File details
Details for the file dspbp-0.1.1-pp38-pypy38_pp73-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-pp38-pypy38_pp73-win_amd64.whl
- Upload date:
- Size: 281.2 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7eab9669f1090b7122936fbb34b8a9bd7036c702adc8c6463c189b33b22ea01a
|
|
| MD5 |
cf3a8ef3c0890c6a4c625618184d25bb
|
|
| BLAKE2b-256 |
830ff9fbbece7a0ab0fb2488590f776708d141e12303f5301048fe9452f1c773
|
File details
Details for the file dspbp-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a0c645a00aca5046bc2d10b1cdc174296a49cae29fc3a6d34368f9c12d100e
|
|
| MD5 |
9eaad9b4aa419c441c39c21b4ebda55c
|
|
| BLAKE2b-256 |
937617852ae3a5f30a2fee69064d8cba8ae36f96cc8eb645350c374170ff70ce
|
File details
Details for the file dspbp-0.1.1-pp37-pypy37_pp73-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-pp37-pypy37_pp73-win_amd64.whl
- Upload date:
- Size: 283.1 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed31416f7750a166f1febb12f13a6ebaab91250383b6579ea03d6d5a6cd3adf
|
|
| MD5 |
2f6355be7dc51b51cd41b25cf27726e7
|
|
| BLAKE2b-256 |
478862b47700b2037ae1a155c9af44af4d1b75ef246f7982c6a45577f26f5a57
|
File details
Details for the file dspbp-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9300dee3b81bdb02028378eebab64157a9a7b9d8bac80f649678d5f892d0680b
|
|
| MD5 |
62deacf9b84e2520cfb20fc3fb4b2fee
|
|
| BLAKE2b-256 |
476e02af2c85ffc7d89e561beda9d2a7a0502aee2c84228e8f37227d6654abda
|
File details
Details for the file dspbp-0.1.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 281.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47b6dc2328c58d275916f8c419a56cac3010778a6bf19b82dc9187b402f49717
|
|
| MD5 |
9523abb3c41bbb336e2316f8147b9f76
|
|
| BLAKE2b-256 |
3f74bdf0670dd6f5f70649ec0acb3e1e11c923a12aff1c6dd8aa2c87354abfc2
|
File details
Details for the file dspbp-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20222af740feff78cba11b29d8299d7b78e091578fd50de6749a2b94dc26bada
|
|
| MD5 |
5eca1d953837777eb76e83cf30fae01d
|
|
| BLAKE2b-256 |
b04dabb8becfc7d0af0e60508326a76ce153ad57bbee2628f406bf11bc677843
|
File details
Details for the file dspbp-0.1.1-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 281.8 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
353c82ef6de37c72f4a400992058d5ba778afcc7ed575a20846cde42b81cd4f7
|
|
| MD5 |
f3aa0cd033705c9ea4101b65ad715f14
|
|
| BLAKE2b-256 |
dfda7b2e93ebf39cc767eb3ee52f8c8d37c15c64ba03db188c053308b8fc6220
|
File details
Details for the file dspbp-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffb2efc2f8ec81184aacdbb4aa5c3e05235bbb43e9df7379f963b30b2b143adc
|
|
| MD5 |
8708e44525948e454221b8f9abbb62ad
|
|
| BLAKE2b-256 |
f29bdb7d0f4b327173335dc3490a707324ea30d6997eeb1c01bf6dc3c8c5743d
|
File details
Details for the file dspbp-0.1.1-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 281.2 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b73c44042aeb69f57e6dcff2bc452a9ed13b927ce381cb32be78c21d8fb44ea
|
|
| MD5 |
df4d99cf3261083582342a31dc352933
|
|
| BLAKE2b-256 |
eae2c52841e270f4b2ed479bff2a17905f3ea28620576844e270103d621f28e4
|
File details
Details for the file dspbp-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfddea3b7147100e3db3ac8e50387e232494923e4926bee3ef950347e5fedf85
|
|
| MD5 |
78725f861d961f844684ad90b2312b5e
|
|
| BLAKE2b-256 |
1314791f35df19eb9fbdf5a7e6da464291d49faf00f464ac1815c7682e632215
|
File details
Details for the file dspbp-0.1.1-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 281.2 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
847ae52b5c92c0a8e9fbbe8ddc77428704506f1b56bb4f7545a1a2f710f87f52
|
|
| MD5 |
c86146c369b6778325cd36aebda5b127
|
|
| BLAKE2b-256 |
01aa3fb2785acf260cb0ab19ccea65131c1cc113bb5f0e0b4c3f208e394730cc
|
File details
Details for the file dspbp-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dspbp-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
107753f463872cf5b23400a66324aee0d5096bd7fb7b9aa8344963c0c4a1998a
|
|
| MD5 |
a1e840cd9d86aa16e9deee5031f6f48a
|
|
| BLAKE2b-256 |
f16e38c6835495fbf4e5e02ac1cb03c7d736722d0a9004b4244256dcaf3bfd4d
|