Skip to main content

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.

Metadata

Release files for dspbp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dspbp 0.1.1
File Size Uploaded
dspbp-0.1.1.tar.gz 20.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dspbp 0.1.1
File
dspbp-0.1.1-pp39-pypy39_pp73-win_amd64.whl PyPy 3.9 PyPy 3.9 7.3 Windows x86-64 Details
dspbp-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.9 PyPy 3.9 7.3 Linux glibc 2.17+ x86-64 Details
dspbp-0.1.1-pp38-pypy38_pp73-win_amd64.whl PyPy 3.8 PyPy 3.8 7.3 Windows x86-64 Details
dspbp-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.8 PyPy 3.8 7.3 Linux glibc 2.17+ x86-64 Details
dspbp-0.1.1-pp37-pypy37_pp73-win_amd64.whl PyPy 3.7 PyPy 3.7 7.3 Windows x86-64 Details
dspbp-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 Linux glibc 2.17+ x86-64 Details
dspbp-0.1.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
dspbp-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
dspbp-0.1.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
dspbp-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
dspbp-0.1.1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
dspbp-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
dspbp-0.1.1-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
dspbp-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 10.5 MB

Release files / dspbp-0.1.1.tar.gz

Download URL dspbp-0.1.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5750eb2ff705bd8fa21f27dbb36e73bb0e4280a0c5b538f5dd3a995aa39c5fbd
BLAKE2b-256 checksum
How to use checksums
c2d5d2750352a43c7d41a633e0a50931529d151ba287a86263408c9fca139fd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-pp39-pypy39_pp73-win_amd64.whl

Download URL dspbp-0.1.1-pp39-pypy39_pp73-win_amd64.whl
Size 281.4 kB
Tags PyPy 3.9 PyPy 3.9 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
7283939eb2004eb6592d0d8e5695481e0994e6ccad7b5a8f7ba3e4dbb30386c9
BLAKE2b-256 checksum
How to use checksums
82235433d3c8a1d167cc1705ca9f4dec9c8af6d4f8208dcb5f3902fc0d985c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3
SHA-256 checksum
How to use checksums
bacfba6ffd1bbd4e82433d64b6537f2086edadf1a4925c1aa32ef65c5f7b3d62
BLAKE2b-256 checksum
How to use checksums
d19862682817f99338a775b26925979b980444c1c925368a7ea8c59df8f01769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-pp38-pypy38_pp73-win_amd64.whl

Download URL dspbp-0.1.1-pp38-pypy38_pp73-win_amd64.whl
Size 281.2 kB
Tags PyPy 3.8 PyPy 3.8 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
7eab9669f1090b7122936fbb34b8a9bd7036c702adc8c6463c189b33b22ea01a
BLAKE2b-256 checksum
How to use checksums
830ff9fbbece7a0ab0fb2488590f776708d141e12303f5301048fe9452f1c773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3
SHA-256 checksum
How to use checksums
f0a0c645a00aca5046bc2d10b1cdc174296a49cae29fc3a6d34368f9c12d100e
BLAKE2b-256 checksum
How to use checksums
937617852ae3a5f30a2fee69064d8cba8ae36f96cc8eb645350c374170ff70ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-pp37-pypy37_pp73-win_amd64.whl

Download URL dspbp-0.1.1-pp37-pypy37_pp73-win_amd64.whl
Size 283.1 kB
Tags PyPy 3.7 PyPy 3.7 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
5ed31416f7750a166f1febb12f13a6ebaab91250383b6579ea03d6d5a6cd3adf
BLAKE2b-256 checksum
How to use checksums
478862b47700b2037ae1a155c9af44af4d1b75ef246f7982c6a45577f26f5a57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3
SHA-256 checksum
How to use checksums
9300dee3b81bdb02028378eebab64157a9a7b9d8bac80f649678d5f892d0680b
BLAKE2b-256 checksum
How to use checksums
476e02af2c85ffc7d89e561beda9d2a7a0502aee2c84228e8f37227d6654abda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp310-cp310-win_amd64.whl

Download URL dspbp-0.1.1-cp310-cp310-win_amd64.whl
Size 281.6 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
47b6dc2328c58d275916f8c419a56cac3010778a6bf19b82dc9187b402f49717
BLAKE2b-256 checksum
How to use checksums
3f74bdf0670dd6f5f70649ec0acb3e1e11c923a12aff1c6dd8aa2c87354abfc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
20222af740feff78cba11b29d8299d7b78e091578fd50de6749a2b94dc26bada
BLAKE2b-256 checksum
How to use checksums
b04dabb8becfc7d0af0e60508326a76ce153ad57bbee2628f406bf11bc677843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp39-cp39-win_amd64.whl

Download URL dspbp-0.1.1-cp39-cp39-win_amd64.whl
Size 281.8 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
353c82ef6de37c72f4a400992058d5ba778afcc7ed575a20846cde42b81cd4f7
BLAKE2b-256 checksum
How to use checksums
dfda7b2e93ebf39cc767eb3ee52f8c8d37c15c64ba03db188c053308b8fc6220
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ffb2efc2f8ec81184aacdbb4aa5c3e05235bbb43e9df7379f963b30b2b143adc
BLAKE2b-256 checksum
How to use checksums
f29bdb7d0f4b327173335dc3490a707324ea30d6997eeb1c01bf6dc3c8c5743d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp38-cp38-win_amd64.whl

Download URL dspbp-0.1.1-cp38-cp38-win_amd64.whl
Size 281.2 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
1b73c44042aeb69f57e6dcff2bc452a9ed13b927ce381cb32be78c21d8fb44ea
BLAKE2b-256 checksum
How to use checksums
eae2c52841e270f4b2ed479bff2a17905f3ea28620576844e270103d621f28e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bfddea3b7147100e3db3ac8e50387e232494923e4926bee3ef950347e5fedf85
BLAKE2b-256 checksum
How to use checksums
1314791f35df19eb9fbdf5a7e6da464291d49faf00f464ac1815c7682e632215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp37-cp37m-win_amd64.whl

Download URL dspbp-0.1.1-cp37-cp37m-win_amd64.whl
Size 281.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
847ae52b5c92c0a8e9fbbe8ddc77428704506f1b56bb4f7545a1a2f710f87f52
BLAKE2b-256 checksum
How to use checksums
01aa3fb2785acf260cb0ab19ccea65131c1cc113bb5f0e0b4c3f208e394730cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / dspbp-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dspbp-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
107753f463872cf5b23400a66324aee0d5096bd7fb7b9aa8344963c0c4a1998a
BLAKE2b-256 checksum
How to use checksums
f16e38c6835495fbf4e5e02ac1cb03c7d736722d0a9004b4244256dcaf3bfd4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

15 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page