typeshed VS Poetry

Compare typeshed vs Poetry and see what are their differences.

typeshed

Collection of library stubs for Python, with static types (by python)

Poetry

Python packaging and dependency management made easy (by python-poetry)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
typeshed Poetry
24 375
4,017 29,170
2.0% 3.3%
9.9 9.6
about 14 hours ago about 16 hours ago
Python Python
GNU General Public License v3.0 or later MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

typeshed

Posts with mentions or reviews of typeshed. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-26.
  • Ask HN: Will we see a TypeScript for Python?
    2 projects | news.ycombinator.com | 26 Feb 2023
    https://github.com/python/typeshed is Python's equivalent of DefinitelyTyped. I'm not 100% sure why it's not more of a popular thing the way DefinitelyTyped is; I think there might, to some extent, be different attitudes around the appropriateness of having third-party typings for packages, when the actual maintainer of the package isn't interested in providing first-party ones.
  • Why Type Hinting Sucks!
    7 projects | /r/Python | 10 Feb 2023
    https://github.com/python/mypy same with typeshed https://github.com/python/typeshed
  • When the client's management is happy but their dev team is a pain
    8 projects | /r/ProgrammerHumor | 31 Jan 2023
    Here's the tensorflow type stubs on typeshed. https://github.com/python/typeshed/tree/main/stubs/tensorflow
  • Ruby 3.2’s YJIT is Production-Ready
    8 projects | news.ycombinator.com | 17 Jan 2023
    Python's type hints are definitely an improvement and they're getting better all the time, but they're still frustrating to use at anything approaching the edge. I long for something as elegant and functional as TypeScript.

    One hurdle I've stumbled over recently is the question "what is a type?", the answer can be surprising. Unions, for example, are types but not `Type`s. A function that takes an argument of type `Type` will not accept a Union. So if you want to write a function that effectively "casts" a parameter to a specified type, you can't. The best you can do is have an overload that accepts `Type` and does an actual cast, and then another that just turns it into `Any`. This is, in fact, how the standard library types its `cast` function [1]. The argument I've seen for the current behavior is that `Type` describes anything that can be passed to isinstance, but that's not a satisfying answer. Even then, `Union` can be passed to isinstance and still does not work with `Type`. Talk currently is to introduce a new kind of type called `TypeForm` or something to address this, which is certainly an improvement over nothing, but still feels like technical debt.

    [1]: https://github.com/python/typeshed/blob/main/stdlib/typing.p...

  • GitHub stars won't pay your rent
    5 projects | news.ycombinator.com | 9 Nov 2022
    >Ultimately if you care enough about Fody to spend over a hundred dollars worth of your time contributing to it, you probably care enough about Fody to drop them three dollars.

    No, I really don't.

    https://github.com/keepassxreboot/keepassxc/pull/8500 - I was randomly reading keepassxc's manpage and spotted a curious option, spent some time spelunking through the code and history to discover that it was an outdated option, sent a PR.

    https://github.com/python/typeshed/pull/8617 - I converted one of the scripts I use in my DE from shell to Python, saw that VSCode has this new fancy typing support for Python, quickly found a basic bug in the type definitions for the os module, tested a fix locally, sent a PR.

    https://gitlab.gnome.org/GNOME/gtk/-/issues/5250 - I found an issue with copy-paste on my phone, investigated it all the way through to the GTK stack, found the commits that introduced the issue, created a distro patch for it while discussing it with GTK upstream.

    https://gitlab.alpinelinux.org/alpine/aports/-/merge_request... - I noticed that gnome-passwordsafe crashes some times, debugged it to discover that it was missing a dependency, sent a PR to the distro package to update the dependencies.

    etc etc. I've made lots of fixes like these. I have no interest in paying for each and every one of them. The projects are all better off for fixes like mine and gatekeeping them on payment would've been nothing but their loss.

  • Using Mypy in Production
    11 projects | news.ycombinator.com | 22 Aug 2022
    You have to do handling like that in other languages like TypeScript anyway.

    Painpoint with type annotations:

    - not being able to reuse "shapes" of data: TypedDict, NamedTuple, dataclasses.dataclass, and soon kwargs (PEP 692 [1]) all have named, typed fields now. You have to

    - Since there's no generic "shape" structure that works across data types, there isn't a way to load up a JSON / YAML / TOML into a dictionary, upcast it via a `TypedGuard`, and pass it into a TypedDict / NamedTuple / Dataclass. dataclasses.asdict() or dataclasses.astuple() return naive / untyped tuples and dicts. Also the factory functions will not work with TypedDict or NamedTuple, respectively, even if you duplicate the fields by hand. See my post here: https://github.com/python/typeshed/issues/8580

    - Standard library doesn't have runtime validation (e.g. pydantic / https://github.com/pydantic/pydantic).

    - pytest fixtures are hard.

    - Django is hard. PEP 681 may not be a saving grace either. [3]

    [1] https://peps.python.org/pep-0692/

  • Welcome to hassle free coding
    4 projects | /r/ProgrammerHumor | 28 May 2022
    The whole Python Standard Library: https://github.com/python/typeshed/tree/master/stdlib
  • Python’s “Type Hints” are a bit of a disappointment to me
    15 projects | news.ycombinator.com | 21 Apr 2022
    https://github.com/python/typeshed also provides community maintained stub packages for packages that are lacking upstream type hints
  • Java vs python is debatable 🤔
    3 projects | /r/ProgrammerHumor | 3 Apr 2022
    Using any linter + type checker solves many of your problems. Just annotate your types (possibly using the typing module below Python 3.10), run flake8 and mypy and you're fine. Also c.f. PEP-484 for how and why it was done like this. And use typeshed stubs for untyped libs, most major libraries have typings in there ;)
  • Why Static Languages Suffer From Complexity
    8 projects | /r/rust | 19 Jan 2022
    Do you mean declaration files (*.d.ts) and DefinitelyTyped? Python has equivalents of those in type stubs (*.pyi) and typeshed.

Poetry

Posts with mentions or reviews of Poetry. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-02.
  • How to Enhance Content with Semantify
    4 projects | dev.to | 2 Mar 2024
    The Semantify repository provides an example Astro.js project. Ensure you have poetry installed, then build the project from the root of the repository:
  • Uv: Python Packaging in Rust
    9 projects | news.ycombinator.com | 15 Feb 2024
    Has anyone else been paying attention to how hilariously hard it is to package PyTorch in poetry?

    https://github.com/python-poetry/poetry/issues/6409

  • Boring Python: dependency management (2022)
    3 projects | news.ycombinator.com | 4 Feb 2024
    Based on this comment 5 days ago[0], it's working? I'm not sure didn't dig in too far but based on that comment it seems fair to say that it's not fully Poetry's fault because torch removed hashes (which poetry needs to be effective) for a while only recently adding it back in.

    Not sure where I would stand if I fully investigated it tho.

    [0] https://github.com/python-poetry/poetry/issues/6409#issuecom...

  • Fun with Avatars: Crafting the core engine | Part. 1
    4 projects | dev.to | 20 Jan 2024
    We will be running this project in Python 3.10 on Mac/Linux, and we will use Poetry to manage our dependencies. Later, we will bundle our app into a container using docker for deployment.
  • Python Packaging, One Year Later: A Look Back at 2023 in Python Packaging
    2 projects | news.ycombinator.com | 16 Jan 2024
    Here are the two main packaging issues I run into, specifically when using Poetry:

    1) Lack of support for building extension modules (as mentioned by the article). There is a workaround using an undocumented feature [0], which I've tried, but ultimately decided it was not the right approach. I still use Poetry, but build the extension as a separate step in CI, rather than kludging it into Poetry.

    2) Lack of support for offline installs [1], e.g. being able to download the dependencies, copy them to another machine, and perform the install from the downloaded dependencies (similar to using "pip --no-index --find-links=."). Again, you can work around this (by using "poetry export --with-credentials" and "pip download" for fetching the dependencies, then firing up pypiserver [2] to run a local PyPI server on the offline machine), but ideally this would all be a first class feature of Poetry, similar to how it is in pip.

    I don't have the capacity to create Pull Requests for addressing these issues with Poetry, and I'm very grateful for the maintainers and those who do contribute. Instead, on the linked issues I share my notes on the matter, in the hope that it may at least help others and potentially get us closer to a solution.

    Regardless, I'm sticking with Poetry for now. Though to be fair, the only other Python packaging tools I've used extensively are Pipenv and pip/setuptools. It's time consuming to thoroughly try out these other packaging tools, and is generally lower priority than developing features/fixing bugs, so it's helpful to read about the author's experience with these other tools, such as PDM and Hatch.

    [0] https://github.com/python-poetry/poetry/issues/2740

    [1] https://github.com/python-poetry/poetry/issues/2184

    [2] https://pypi.org/project/pypiserver/

  • Introducing Flama for Robust Machine Learning APIs
    11 projects | dev.to | 18 Dec 2023
    We believe that poetry is currently the best tool for this purpose, besides of being the most popular one at the moment. This is why we will use poetry to manage the dependencies of our project throughout this series of posts. Poetry allows you to declare the libraries your project depends on, and it will manage (install/update) them for you. Poetry also allows you to package your project into a distributable format and publish it to a repository, such as PyPI. We strongly recommend you to learn more about this tool by reading the official documentation.
  • Poetry VS instld - a user suggested alternative
    2 projects | 9 Dec 2023
  • Navigating the Release Journey of txtToWeb
    2 projects | dev.to | 27 Nov 2023
    For the release of txtToWeb, I opted for Poetry as my release tool and TestPyPI as the package registry. Poetry's simplicity and TestPyPI's environment for testing releases were crucial factors in my decision.
  • 📜 RepoList - A tool to generate wordlists based on GitHub repositories
    5 projects | dev.to | 24 Nov 2023
    I've used Python with Poetry to create Repolist. Poetry is fairly new to me and It was a great experience using it. Easy setup and dependency management. With few commands, I was able to create the project and publish it to PyPI. I will definitely use it for my future projects.
  • My first Software Release using GitHub Release
    6 projects | dev.to | 24 Nov 2023
    There were various approaches recommended depending on our language and ecosystem. My classmates who developed using Node.js were recommended npm, and PyPI or poetry for Python. Since my program is written in C++, I was recommended to look into one of vcpkg or conan, but I ultimately did not use either package manager.

What are some alternatives?

When comparing typeshed and Poetry you can also consider the following projects:

Pipenv - Python Development Workflow for Humans.

PDM - A modern Python package and dependency manager supporting the latest PEP standards

hatch - Modern, extensible Python project management

pyenv - Simple Python version management

pip-tools - A set of tools to keep your pinned Python dependencies fresh.

virtualenv - Virtual Python Environment builder

conda - A system-level, binary package and environment manager running on all major operating systems and platforms.

pipx - Install and Run Python Applications in Isolated Environments

flit - Simplified packaging of Python modules

PyInstaller - Freeze (package) Python programs into stand-alone executables

pip - The Python package installer

rez - An integrated package configuration, build and deployment system for software