mightyspatial
Python SDK for the Mighty Spatial IFC-to-GIS conversion API. Convert IFC (BIM) files to GeoJSON, GeoPackage, Shapefile, and File Geodatabase.
Documentation | Free Web Converter | Get API Key
Installation
pip install mightyspatial
Quick Start
One-step conversion
from mightyspatial import convert
# Convert with no API key (free tier: 5/month, up to 50MB)
result = convert("building.ifc")
print(result) # /path/to/building.geojson
# Specify output format
convert("building.ifc", output_format="geopackage")
Using the client
from mightyspatial import MightySpatial
ms = MightySpatial(api_key="ms_...")
# One-step convert
ms.convert("building.ifc", output_format="geojson")
# Convert from a URL
ms.convert(file_url="https://example.com/model.ifc", output_path="output.geojson")
# Strip property name prefixes/suffixes
ms.convert("building.ifc", strip_prefix="Pset_", strip_suffix="_Value")
# Include CSV attribute tables
ms.convert("building.ifc", include_csv=True)
Preview and download (two-step)
ms = MightySpatial(api_key="ms_...")
# Step 1: Preview -- inspect layers and metadata before downloading
preview = ms.preview("building.ifc")
print(preview["detected_crs"])
print(preview["layers"])
# Step 2: Download in your preferred format
job_id = preview["job_id"]
ms.download(job_id, output_format="geopackage", output_path="building.gpkg")
Pipe generation
ms = MightySpatial(api_key="ms_...")
preview = ms.preview("pipes.ifc")
job_id = preview["job_id"]
# Find the polyline layer
polyline_layer = next(l for l in preview["layers"] if "Line" in l["geometry_type"])
# Generate 3D pipe geometry
pipes = ms.generate_pipes(
job_id=job_id,
source_layer=polyline_layer["name"],
features=polyline_layer["geojson"]["features"],
default_diameter=300,
uom="mm",
segments=8,
)
print(pipes["layer"]["feature_count"])
API key from environment variable
export MIGHTY_SPATIAL_API_KEY="ms_..."
from mightyspatial import convert
# Automatically uses MIGHTY_SPATIAL_API_KEY
convert("building.ifc")
Supported Output Formats
| Format | Extension | Free Tier | Pro Tier |
|---|---|---|---|
| GeoJSON | .geojson |
Yes | Yes |
| GeoPackage | .gpkg |
-- | Yes |
| Shapefile | .shp.zip |
-- | Yes |
| File GDB | .gdb.zip |
-- | Yes |
Pricing
| Tier | Price | Conversions | Max File Size |
|---|---|---|---|
| Free | $0 | 5/month | 50 MB |
| Pro | $0.50/conversion | 100/month | 500 MB |
| Enterprise | Custom | Unlimited | Custom |
Get your API key at mightyspatial.com/dashboard.
Error Handling
from mightyspatial import MightySpatial, RateLimitError, FileTooLargeError
ms = MightySpatial()
try:
ms.convert("large_building.ifc")
except RateLimitError as e:
print(e) # Includes upgrade URL
print(e.help_url) # https://mightyspatial.com/dashboard
except FileTooLargeError as e:
print(e) # Includes tier limits
Links
License
MIT -- see LICENSE for details.
Metadata
Release files for mightyspatial 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mightyspatial-0.2.1.tar.gz | 9.0 kB | Without provenance | Details for mightyspatial-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mightyspatial-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for mightyspatial-0.2.1-py3-none-any.whl |
Total release size: 19.9 kB
Release files / mightyspatial-0.2.1.tar.gz
| Download URL | mightyspatial-0.2.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d07f0df22adec9dedf2433ae612b5e408a6e7cd29ef4338a62c249d87cb69c0
|
|
BLAKE2b-256 checksum How to use checksums |
ca59a2a213277902eb8dce7edaf64bf3acf0db24aff0717e0d94c69e1637d85a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / mightyspatial-0.2.1-py3-none-any.whl
| Download URL | mightyspatial-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bc825c0adf63740191519c55d1f3ffc1e03fcdce3230266679d0ae1a6fa6a09
|
|
BLAKE2b-256 checksum How to use checksums |
d2f01d05c483905a65c29ebc6cdd12653c455abd5033bb69ae8cb451838dfbf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for mightyspatial 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.