Skip to main content

Typename

CI

The typename module defines a single function also called typename which returns the name of the type of any object as a string.

Its purpose is purely aesthetic, to avoid unsightly constructs such as type(obj).__name__ or the ghastly obj.__class__.__name__.

Installation

The typename package is available on the Python Package Index (PyPI):

PyPI version

Typename should work with any version of Python 3. To install:

With pip from PyPI:

pip install typename

How to use

>>> from typename import typename
>>> x = 5
>>> typename(x)
'int'

MIT License

Copyright (c) Sixty North

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for typename 1.0.4

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

Source distribution (sdist)

Source distribution for typename 1.0.4
File Size Uploaded
typename-1.0.4.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typename 1.0.4
File Interpreter ABI Platform
typename-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / typename-1.0.4.tar.gz

Download URL typename-1.0.4.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a3db47d5df84d6667ce23456c7775eb658314c413667549e787f5657e825923f
BLAKE2b-256 checksum
How to use checksums
2fc1a505c885b63161ea3588baa48ea1a3a664cafc40fe7b784ee15f9558164e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / typename-1.0.4-py3-none-any.whl

Download URL typename-1.0.4-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba422aa55026a86632d5c12ac58fff2893fb3dc85e119b3d11cb21a945e7d1ad
BLAKE2b-256 checksum
How to use checksums
29e1b6752e5131f90b47aa618c73e77dd6703e5ddc420851c7b2c1d4306b64db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 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