> data-languages
File extensions for data languages.
It's just a JSON file, so you can use it in any environment. Sourced from GitHub's Linguist project (defines all 145 data languages known to GitHub). Data is updated via script and released via new package version.
Installation
pip install data-languages
Usage
import data_languages
json_lang_data = data_languages['JSON']
print(json_lang_data['extensions']) # => ['.4DForm', '.4DProject', '.avsc', ...]
Note: Most type checkers will falsely warn data_languages is not subscriptable because they are incapable of analyzing runtime behavior (where the module is replaced w/ a dictionary for cleaner, direct access). You can safely suppress such warnings using # type: ignore.
Examples
Get language(s) from an extension:
def get_lang(file_ext):
lang_matches = [
lang for lang, data in data_languages.items()
if file_ext in data['extensions']
]
return lang_matches[0] if len(lang_matches) == 1 else lang_matches
print(get_lang('.ical')) # => iCalendar
Get language(s) from a file path:
def get_lang_from_path(filepath):
from pathlib import Path
file_ext = Path(filepath).suffix
lang_matches = [
lang for lang, data in data_languages.items()
if file_ext in data['extensions']
]
return lang_matches[0] if len(matches) == 1 else lang_matches
print(get_lang_from_path('steam.vdf')) # => Valve Data Format
print(get_lang_from_path('Sublime.sublime-snippet')) # => XML
print(get_lang_from_path('README.md')) # => [] (use prose-languages pkg)
MIT License
Copyright © 2026 Adam Lui
Related
</> markup-languages - File extensions for markup languages.
🇨🇳 non-latin-locales - ISO 639-1 (2-letter) codes for non-Latin locales.
#! programming-languages - File extensions for programming languages.
Metadata
Release files for data-languages 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| data_languages-1.1.0.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| data_languages-1.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / data_languages-1.1.0.tar.gz
| Download URL | data_languages-1.1.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86a08057834cccef4923b82b51c522f1f33bda4182da2dc80a002ca194c1db73
|
|
BLAKE2b-256 checksum How to use checksums |
f62af18f709c4b2a4cabd36cab06bf774df76eb46d090bdb2b0f0e04069730f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / data_languages-1.1.0-py2.py3-none-any.whl
| Download URL | data_languages-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d8379e2e5fe6b799e4ce814efadbc4640979fd7626dff0d9e5c2f94a664cef2c
|
|
BLAKE2b-256 checksum How to use checksums |
105b2aff5ad965de6231ad1f53fe26e477a1a202cb99ec5ccd0eba2dc7986e29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency log