1hts VS typeshed

Compare 1hts vs typeshed and see what are their differences.

1hts

Some tools to help with one handed typing on linux (by Adjective-Object)

typeshed

Collection of library stubs for Python, with static types (by python)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
1hts typeshed
1 24
0 4,017
- 2.0%
0.0 9.9
over 2 years ago about 18 hours ago
Python Python
- GNU General Public License v3.0 or later
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.

1hts

Posts with mentions or reviews of 1hts. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning 1hts yet.
Tracking mentions began in Dec 2020.

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.

What are some alternatives?

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

pyre-check - Performant type-checking for python.

mypy - Optional static typing for Python

NumPy - The fundamental package for scientific computing with Python.

flask-parameter-validation - Get and validate all Flask input parameters with ease.

Nuitka - Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.

dactyl-keyboard - Web generator for dactyl keyboards.

doctest - The fastest feature-rich C++11/14/17/20/23 single-header testing framework

PyCall.jl - Package to call Python functions from the Julia language

pydantic - Data validation using Python type hints

typeguard - Run-time type checker for Python

DefinitelyTyped - The repository for high quality TypeScript type definitions.

lean4 - Lean 4 programming language and theorem prover