programming-languages 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- programming_languages-1.0.0/PKG-INFO +135 -0
- programming_languages-1.0.0/docs/LICENSE.md +21 -0
- programming_languages-1.0.0/docs/README.md +82 -0
- programming_languages-1.0.0/pyproject.toml +92 -0
- programming_languages-1.0.0/setup.cfg +7 -0
- programming_languages-1.0.0/src/programming_languages/__init__.py +6 -0
- programming_languages-1.0.0/src/programming_languages/languages.json +891 -0
- programming_languages-1.0.0/src/programming_languages.egg-info/PKG-INFO +135 -0
- programming_languages-1.0.0/src/programming_languages.egg-info/SOURCES.txt +11 -0
- programming_languages-1.0.0/src/programming_languages.egg-info/dependency_links.txt +1 -0
- programming_languages-1.0.0/src/programming_languages.egg-info/requires.txt +5 -0
- programming_languages-1.0.0/src/programming_languages.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: programming-languages
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: File extensions for programming languages.
|
|
5
|
+
Author-email: Adam Lui <adam@kudoai.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Changelog, https://github.com/adamlui/python-utils/releases/tag/programming-languages-1.0.0
|
|
8
|
+
Project-URL: Documentation, https://github.com/adamlui/python-utils/tree/main/programming-languages/docs
|
|
9
|
+
Project-URL: Funding, https://github.com/sponsors/adamlui
|
|
10
|
+
Project-URL: Homepage, https://github.com/adamlui/python-utils/tree/main/programming-languages/#readme
|
|
11
|
+
Project-URL: Issues, https://github.com/adamlui/python-utils/issues
|
|
12
|
+
Project-URL: PyPI Stats, https://pepy.tech/projects/programming-languages
|
|
13
|
+
Project-URL: Releases, https://github.com/adamlui/python-utils/releases
|
|
14
|
+
Project-URL: Repository, https://github.com/adamlui/python-utils
|
|
15
|
+
Keywords: code-languages,computer-languages,extensions,file-extensions,file‑type-detection,filenames,github,language-detection,languages,linguist,programming-languages,syntax-highlighting
|
|
16
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: Education
|
|
19
|
+
Classifier: Intended Audience :: Information Technology
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: Intended Audience :: System Administrators
|
|
22
|
+
Classifier: Natural Language :: English
|
|
23
|
+
Classifier: Operating System :: OS Independent
|
|
24
|
+
Classifier: Programming Language :: Python
|
|
25
|
+
Classifier: Programming Language :: Python :: 2
|
|
26
|
+
Classifier: Programming Language :: Python :: 2.6
|
|
27
|
+
Classifier: Programming Language :: Python :: 2.7
|
|
28
|
+
Classifier: Programming Language :: Python :: 3
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
30
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
37
|
+
Classifier: Topic :: Education
|
|
38
|
+
Classifier: Topic :: Scientific/Engineering
|
|
39
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
40
|
+
Classifier: Topic :: Software Development
|
|
41
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
42
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
43
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
44
|
+
Classifier: Topic :: Utilities
|
|
45
|
+
Requires-Python: <4,>=2.6
|
|
46
|
+
Description-Content-Type: text/markdown
|
|
47
|
+
License-File: docs/LICENSE.md
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: nox>=2026.2.9; extra == "dev"
|
|
50
|
+
Requires-Dist: tomli~=2.4.0; extra == "dev"
|
|
51
|
+
Requires-Dist: tomli-w~=1.2.0; extra == "dev"
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
<a id="top"></a>
|
|
55
|
+
|
|
56
|
+
# > programming-languages
|
|
57
|
+
|
|
58
|
+
<a href="https://github.com/adamlui/python-utils/releases/tag/programming-languages-1.0.0">
|
|
59
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-1.0.0-32fcee.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
60
|
+
<a href="https://github.com/adamlui/python-utils/blob/main/programming-languages/docs/LICENSE.md">
|
|
61
|
+
<img height=31 src="https://img.shields.io/badge/License-MIT-f99b27.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
62
|
+
<a href="https://www.codefactor.io/repository/github/adamlui/python-utils">
|
|
63
|
+
<img height=31 src="https://img.shields.io/codefactor/grade/github/adamlui/python-utils?label=Code+Quality&logo=codefactor&logoColor=white&labelColor=464646&color=a0fc55&style=for-the-badge"></a>
|
|
64
|
+
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_python-utils">
|
|
65
|
+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_python-utils%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=fafc74"></a>
|
|
66
|
+
|
|
67
|
+
> ### _File extensions for programming languages._
|
|
68
|
+
|
|
69
|
+
It's just a [JSON file](https://github.com/adamlui/python-utils/blob/programming-languages-1.0.0/programming-languages/src/programming_languages/languages.json), so you can use it in any environment. Sourced from GitHub's [Linguist](https://github.com/github-linguist/linguist) project (defines all 700+ languages known to GitHub), the data is updated via script and released w/ each new version.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install programming-languages
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
```py
|
|
80
|
+
import programming_languages
|
|
81
|
+
|
|
82
|
+
py_lang_data = programming_languages['Python']
|
|
83
|
+
|
|
84
|
+
print(py_lang_data['extensions']) # => ['.py', '.cgi', '.fcgi', ...]
|
|
85
|
+
print(py_lang_data['type']) # => 'programming'
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
_Note: Most type checkers will falsely warn_ `programming_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`.
|
|
89
|
+
|
|
90
|
+
## Examples
|
|
91
|
+
|
|
92
|
+
List all extensions for a language:
|
|
93
|
+
|
|
94
|
+
```py
|
|
95
|
+
js_exts = programming_languages['JavaScript']['extensions']
|
|
96
|
+
|
|
97
|
+
print(js_exts) # => ['.js', '._js', '.bones', '.cjs', ...]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Get language from an extension:
|
|
101
|
+
|
|
102
|
+
```py
|
|
103
|
+
def get_lang(file_ext):
|
|
104
|
+
for lang, data in programming_languages.items():
|
|
105
|
+
if file_ext in data['extensions']:
|
|
106
|
+
return lang
|
|
107
|
+
|
|
108
|
+
print(get_lang('.rs')) # => 'Rust'
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Filter by language type:
|
|
112
|
+
|
|
113
|
+
```py
|
|
114
|
+
markup_langs = {
|
|
115
|
+
lang for lang, data in programming_languages.items()
|
|
116
|
+
if data['type'] == 'markup'
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
print(markup_langs) # => ['HTML+ECR', 'PostCSS', 'Go Template', 'SCSS', ...]
|
|
120
|
+
print(f'{len(markup_langs)} markup languages') # -> '69 markup languages'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## MIT License
|
|
124
|
+
|
|
125
|
+
Copyright © 2026 [Adam Lui](https://github.com/adamlui).
|
|
126
|
+
|
|
127
|
+
## Related
|
|
128
|
+
|
|
129
|
+
🇨🇳 [non-latin-locales](https://github.com/adamlui/python-utils/tree/main/non-latin-locales/#readme) - ISO 639-1 (2-letter) codes for non-Latin locales.
|
|
130
|
+
<br>📟 [is-unicode-supported](https://github.com/adamlui/python-utils/tree/main/is-unicode-supported/#readme) - Detect whether the terminal supports advanced Unicode.
|
|
131
|
+
<br>🏷️ [project-markers](https://github.com/adamlui/python-utils/tree/main/project-markers/#readme) - Common project root markers.
|
|
132
|
+
|
|
133
|
+
#
|
|
134
|
+
|
|
135
|
+
<a href="#top">Back to top ↑</a>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# 🏛️ MIT License
|
|
2
|
+
|
|
3
|
+
**Copyright © 2026 [Adam Lui](https://github.com/adamlui)**
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<a id="top"></a>
|
|
2
|
+
|
|
3
|
+
# > programming-languages
|
|
4
|
+
|
|
5
|
+
<a href="https://github.com/adamlui/python-utils/releases/tag/programming-languages-1.0.0">
|
|
6
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-1.0.0-32fcee.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
7
|
+
<a href="https://github.com/adamlui/python-utils/blob/main/programming-languages/docs/LICENSE.md">
|
|
8
|
+
<img height=31 src="https://img.shields.io/badge/License-MIT-f99b27.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
9
|
+
<a href="https://www.codefactor.io/repository/github/adamlui/python-utils">
|
|
10
|
+
<img height=31 src="https://img.shields.io/codefactor/grade/github/adamlui/python-utils?label=Code+Quality&logo=codefactor&logoColor=white&labelColor=464646&color=a0fc55&style=for-the-badge"></a>
|
|
11
|
+
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_python-utils">
|
|
12
|
+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_python-utils%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=fafc74"></a>
|
|
13
|
+
|
|
14
|
+
> ### _File extensions for programming languages._
|
|
15
|
+
|
|
16
|
+
It's just a [JSON file](https://github.com/adamlui/python-utils/blob/programming-languages-1.0.0/programming-languages/src/programming_languages/languages.json), so you can use it in any environment. Sourced from GitHub's [Linguist](https://github.com/github-linguist/linguist) project (defines all 700+ languages known to GitHub), the data is updated via script and released w/ each new version.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install programming-languages
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```py
|
|
27
|
+
import programming_languages
|
|
28
|
+
|
|
29
|
+
py_lang_data = programming_languages['Python']
|
|
30
|
+
|
|
31
|
+
print(py_lang_data['extensions']) # => ['.py', '.cgi', '.fcgi', ...]
|
|
32
|
+
print(py_lang_data['type']) # => 'programming'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
_Note: Most type checkers will falsely warn_ `programming_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`.
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
List all extensions for a language:
|
|
40
|
+
|
|
41
|
+
```py
|
|
42
|
+
js_exts = programming_languages['JavaScript']['extensions']
|
|
43
|
+
|
|
44
|
+
print(js_exts) # => ['.js', '._js', '.bones', '.cjs', ...]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Get language from an extension:
|
|
48
|
+
|
|
49
|
+
```py
|
|
50
|
+
def get_lang(file_ext):
|
|
51
|
+
for lang, data in programming_languages.items():
|
|
52
|
+
if file_ext in data['extensions']:
|
|
53
|
+
return lang
|
|
54
|
+
|
|
55
|
+
print(get_lang('.rs')) # => 'Rust'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Filter by language type:
|
|
59
|
+
|
|
60
|
+
```py
|
|
61
|
+
markup_langs = {
|
|
62
|
+
lang for lang, data in programming_languages.items()
|
|
63
|
+
if data['type'] == 'markup'
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
print(markup_langs) # => ['HTML+ECR', 'PostCSS', 'Go Template', 'SCSS', ...]
|
|
67
|
+
print(f'{len(markup_langs)} markup languages') # -> '69 markup languages'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## MIT License
|
|
71
|
+
|
|
72
|
+
Copyright © 2026 [Adam Lui](https://github.com/adamlui).
|
|
73
|
+
|
|
74
|
+
## Related
|
|
75
|
+
|
|
76
|
+
🇨🇳 [non-latin-locales](https://github.com/adamlui/python-utils/tree/main/non-latin-locales/#readme) - ISO 639-1 (2-letter) codes for non-Latin locales.
|
|
77
|
+
<br>📟 [is-unicode-supported](https://github.com/adamlui/python-utils/tree/main/is-unicode-supported/#readme) - Detect whether the terminal supports advanced Unicode.
|
|
78
|
+
<br>🏷️ [project-markers](https://github.com/adamlui/python-utils/tree/main/project-markers/#readme) - Common project root markers.
|
|
79
|
+
|
|
80
|
+
#
|
|
81
|
+
|
|
82
|
+
<a href="#top">Back to top ↑</a>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools~=82.0.0",
|
|
4
|
+
"wheel",
|
|
5
|
+
]
|
|
6
|
+
build-backend = "setuptools.build_meta"
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "programming-languages"
|
|
10
|
+
version = "1.0.0"
|
|
11
|
+
description = "File extensions for programming languages."
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Adam Lui", email = "adam@kudoai.com" },
|
|
14
|
+
]
|
|
15
|
+
readme = "docs/README.md"
|
|
16
|
+
license = "MIT"
|
|
17
|
+
license-files = [
|
|
18
|
+
"docs/LICENSE.md",
|
|
19
|
+
]
|
|
20
|
+
requires-python = ">=2.6,<4"
|
|
21
|
+
keywords = [
|
|
22
|
+
"code-languages",
|
|
23
|
+
"computer-languages",
|
|
24
|
+
"extensions",
|
|
25
|
+
"file-extensions",
|
|
26
|
+
"file‑type-detection",
|
|
27
|
+
"filenames",
|
|
28
|
+
"github",
|
|
29
|
+
"language-detection",
|
|
30
|
+
"languages",
|
|
31
|
+
"linguist",
|
|
32
|
+
"programming-languages",
|
|
33
|
+
"syntax-highlighting",
|
|
34
|
+
]
|
|
35
|
+
classifiers = [
|
|
36
|
+
"Development Status :: 5 - Production/Stable",
|
|
37
|
+
"Intended Audience :: Developers",
|
|
38
|
+
"Intended Audience :: Education",
|
|
39
|
+
"Intended Audience :: Information Technology",
|
|
40
|
+
"Intended Audience :: Science/Research",
|
|
41
|
+
"Intended Audience :: System Administrators",
|
|
42
|
+
"Natural Language :: English",
|
|
43
|
+
"Operating System :: OS Independent",
|
|
44
|
+
"Programming Language :: Python",
|
|
45
|
+
"Programming Language :: Python :: 2",
|
|
46
|
+
"Programming Language :: Python :: 2.6",
|
|
47
|
+
"Programming Language :: Python :: 2.7",
|
|
48
|
+
"Programming Language :: Python :: 3",
|
|
49
|
+
"Programming Language :: Python :: 3.8",
|
|
50
|
+
"Programming Language :: Python :: 3.9",
|
|
51
|
+
"Programming Language :: Python :: 3.10",
|
|
52
|
+
"Programming Language :: Python :: 3.11",
|
|
53
|
+
"Programming Language :: Python :: 3.12",
|
|
54
|
+
"Programming Language :: Python :: 3.13",
|
|
55
|
+
"Programming Language :: Python :: 3.14",
|
|
56
|
+
"Programming Language :: Python :: 3.15",
|
|
57
|
+
"Topic :: Education",
|
|
58
|
+
"Topic :: Scientific/Engineering",
|
|
59
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
60
|
+
"Topic :: Software Development",
|
|
61
|
+
"Topic :: Software Development :: Libraries",
|
|
62
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
63
|
+
"Topic :: Text Processing :: Linguistic",
|
|
64
|
+
"Topic :: Utilities",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[project.urls]
|
|
68
|
+
Changelog = "https://github.com/adamlui/python-utils/releases/tag/programming-languages-1.0.0"
|
|
69
|
+
Documentation = "https://github.com/adamlui/python-utils/tree/main/programming-languages/docs"
|
|
70
|
+
Funding = "https://github.com/sponsors/adamlui"
|
|
71
|
+
Homepage = "https://github.com/adamlui/python-utils/tree/main/programming-languages/#readme"
|
|
72
|
+
Issues = "https://github.com/adamlui/python-utils/issues"
|
|
73
|
+
"PyPI Stats" = "https://pepy.tech/projects/programming-languages"
|
|
74
|
+
Releases = "https://github.com/adamlui/python-utils/releases"
|
|
75
|
+
Repository = "https://github.com/adamlui/python-utils"
|
|
76
|
+
|
|
77
|
+
[project.optional-dependencies]
|
|
78
|
+
dev = [
|
|
79
|
+
"nox>=2026.2.9",
|
|
80
|
+
"tomli~=2.4.0",
|
|
81
|
+
"tomli-w~=1.2.0",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.setuptools.packages.find]
|
|
85
|
+
where = [
|
|
86
|
+
"src",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
[tool.setuptools.package-data]
|
|
90
|
+
programming_languages = [
|
|
91
|
+
"languages.json",
|
|
92
|
+
]
|