Skip to main content

Static typing indicator for PyShp 3 (which is already typed). PyShp is a pure Python read/write support for ESRI Shapefile format

Project description

PyShp-stubs

Overview

  • This library is simply to indicate to type checkers that type hints should be included from PyShp's single file module ("shapefile.py"), even e.g. when being run with mypy --ignore-missing-imports.
  • This is a minimal library. As a wheel it solely consists of an empty py.typed marker file in a dir "shapefile-stubs". It contains no actual stubs (as they're not needed, the type hints are in the main library)
  • It is intended to be installed (into "Lib\site-packages") alongside the main PyShp repo (pip install Pyshp[stubs]).
  • The main PyShp repo (from version 3 onwards) contains inline type hints, but is currently a single file module ("shapefile.py").
  • PEP 561 states ""The single-file module should be refactored into a package". We respectfully disagree.
  • If py.typed is installed alongside "shapefile.py" in"Lib\site-packages", all packages installed in that (virtual) Python env will be typechecked by mypy, whether they contain type info or not Nominal type stubs for PyShp.

Description

PyShp 3 is statically typed. PyShp has historically been a single file library (shapefile.py).

According to PEP 561, and the spec in order to add a py.typed marker file (without indicating to type checkers that every package the user has installed adajacent to PyShp should also be type checked, regardless of whether all such packages support that or not), "The single-file module should be refactored into a package".

Myself and several other project contributers are reluctant to give up the single-file module (shapefile.py). We quite like it.

The purpose of this package is purely to indicate to type-checkers that PyShp is typed. It just so happens to be primarily typed in-line in the main library, from which the stubs in shapefile.pyi are largely automatically generated by MyPy's stubgen.

Project details


Download files

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

Source Distribution

pyshp_stubs-0.0.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyshp_stubs-0.0.2-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file pyshp_stubs-0.0.2.tar.gz.

File metadata

  • Download URL: pyshp_stubs-0.0.2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pyshp_stubs-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c7164069eb81ba647dbb9db2dced56c050a0a0eb2e198e3750e2affce6444af2
MD5 19b618a1a26c5e5a635115e4fcb2e06c
BLAKE2b-256 f8622905bd466efd8e79c36ff2a3455c5c04ac66348d410b37acd6f9bcd1defd

See more details on using hashes here.

File details

Details for the file pyshp_stubs-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyshp_stubs-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pyshp_stubs-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e49ffef12ae2b0830c67871ffd2d550bffd986b7c4e2d779e0005ba4ddef09f9
MD5 8b0a117d2f147fd14b01bf15617f0f74
BLAKE2b-256 07dcbefa5124fbf524603caed4b2a092fea113fa4e326da06e1acb4dba257197

See more details on using hashes here.

Supported by

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