nepdate-patro 0.1.0b1__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.
- nepdate_patro-0.1.0b1/.gitignore +11 -0
- nepdate_patro-0.1.0b1/LICENSE +21 -0
- nepdate_patro-0.1.0b1/NOTICE +25 -0
- nepdate_patro-0.1.0b1/PKG-INFO +56 -0
- nepdate_patro-0.1.0b1/README.md +36 -0
- nepdate_patro-0.1.0b1/pyproject.toml +42 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2077.json +2262 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2078.json +4179 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2079.json +4522 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2080.json +4394 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2081.json +4753 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2082.json +4692 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2083.json +4564 -0
- nepdate_patro-0.1.0b1/shared/data/patro/2084.json +70 -0
- nepdate_patro-0.1.0b1/src/nepdate_patro/__init__.py +275 -0
- nepdate_patro-0.1.0b1/src/nepdate_patro/_tables.py +3057 -0
- nepdate_patro-0.1.0b1/src/nepdate_patro/py.typed +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) nepdate contributors
|
|
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,25 @@
|
|
|
1
|
+
The calendar data in this directory (data/calendar/, data/patro/) was extracted from
|
|
2
|
+
NepDate (https://github.com/RajuPrasai/NepDate, commit cb05cb65c7d3cb570c76992a8e83ed1e73213346)
|
|
3
|
+
by tools/extract_from_csharp.py on 2026-09-24, and is used under the MIT License:
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2023 NepDate and contributors
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nepdate-patro
|
|
3
|
+
Version: 0.1.0b1
|
|
4
|
+
Summary: Tithi, public holidays and events for nepdate (Bikram Sambat calendar)
|
|
5
|
+
Author: NepDate contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: Free Threading
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: nepdate-core<0.2,>=0.1.0b1
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# nepdate-patro
|
|
22
|
+
|
|
23
|
+
Tithi, public holidays and events for the Bikram Sambat calendar, as a separate distribution
|
|
24
|
+
from the core [`nepdate-core`](https://pypi.org/project/nepdate-core/) package. It is part of the
|
|
25
|
+
[NepDate](https://github.com/sanamhub/nepdate-python) family; the data comes from the hub
|
|
26
|
+
[`sanamhub/nepdate`](https://github.com/sanamhub/nepdate).
|
|
27
|
+
|
|
28
|
+
```console
|
|
29
|
+
pip install --pre nepdate-patro
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`nepdate-patro` depends on the core package, so `nepdate-core` arrives with it. The import name is
|
|
33
|
+
`nepdate_patro`. `--pre` is needed while only pre-releases exist (0.1.0-beta.1 is `0.1.0b1` on
|
|
34
|
+
PyPI). The data is informational, not an official calendar.
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
>>> from nepdate import NepaliDate
|
|
38
|
+
>>> from nepdate_patro import coverage, info, public_holidays
|
|
39
|
+
>>> day = info(NepaliDate(2081, 1, 1))
|
|
40
|
+
>>> day.tithi.label()
|
|
41
|
+
'Panchami'
|
|
42
|
+
>>> [event.label() for event in day.events]
|
|
43
|
+
['New Year', 'Mesh Sankranti', 'Bisket Jatra']
|
|
44
|
+
>>> coverage().start
|
|
45
|
+
NepaliDate(2077, 1, 1)
|
|
46
|
+
>>> len(list(public_holidays()))
|
|
47
|
+
294
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`info` returns one prebuilt, immutable `CalendarInfo` per day. A date outside the coverage
|
|
52
|
+
returns the same empty object, so it never raises. The data currently covers BS 2077-01-01 to
|
|
53
|
+
2084-08-20.
|
|
54
|
+
|
|
55
|
+
The full API is in [docs/API.md](https://github.com/sanamhub/nepdate-python/blob/main/docs/API.md),
|
|
56
|
+
and the core package is in [nepdate-core](https://github.com/sanamhub/nepdate-python).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# nepdate-patro
|
|
2
|
+
|
|
3
|
+
Tithi, public holidays and events for the Bikram Sambat calendar, as a separate distribution
|
|
4
|
+
from the core [`nepdate-core`](https://pypi.org/project/nepdate-core/) package. It is part of the
|
|
5
|
+
[NepDate](https://github.com/sanamhub/nepdate-python) family; the data comes from the hub
|
|
6
|
+
[`sanamhub/nepdate`](https://github.com/sanamhub/nepdate).
|
|
7
|
+
|
|
8
|
+
```console
|
|
9
|
+
pip install --pre nepdate-patro
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`nepdate-patro` depends on the core package, so `nepdate-core` arrives with it. The import name is
|
|
13
|
+
`nepdate_patro`. `--pre` is needed while only pre-releases exist (0.1.0-beta.1 is `0.1.0b1` on
|
|
14
|
+
PyPI). The data is informational, not an official calendar.
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
>>> from nepdate import NepaliDate
|
|
18
|
+
>>> from nepdate_patro import coverage, info, public_holidays
|
|
19
|
+
>>> day = info(NepaliDate(2081, 1, 1))
|
|
20
|
+
>>> day.tithi.label()
|
|
21
|
+
'Panchami'
|
|
22
|
+
>>> [event.label() for event in day.events]
|
|
23
|
+
['New Year', 'Mesh Sankranti', 'Bisket Jatra']
|
|
24
|
+
>>> coverage().start
|
|
25
|
+
NepaliDate(2077, 1, 1)
|
|
26
|
+
>>> len(list(public_holidays()))
|
|
27
|
+
294
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`info` returns one prebuilt, immutable `CalendarInfo` per day. A date outside the coverage
|
|
32
|
+
returns the same empty object, so it never raises. The data currently covers BS 2077-01-01 to
|
|
33
|
+
2084-08-20.
|
|
34
|
+
|
|
35
|
+
The full API is in [docs/API.md](https://github.com/sanamhub/nepdate-python/blob/main/docs/API.md),
|
|
36
|
+
and the core package is in [nepdate-core](https://github.com/sanamhub/nepdate-python).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "nepdate-patro"
|
|
3
|
+
version = "0.1.0b1"
|
|
4
|
+
description = "Tithi, public holidays and events for nepdate (Bikram Sambat calendar)"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
9
|
+
authors = [{ name = "NepDate contributors" }]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Python",
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Programming Language :: Python :: 3.11",
|
|
14
|
+
"Programming Language :: Python :: 3.12",
|
|
15
|
+
"Programming Language :: Python :: 3.13",
|
|
16
|
+
"Programming Language :: Python :: 3.14",
|
|
17
|
+
"Programming Language :: Python :: Free Threading",
|
|
18
|
+
"Typing :: Typed",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"nepdate-core>=0.1.0b1,<0.2",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[build-system]
|
|
25
|
+
# hatchling, not uv_build: the sdist must carry the patro JSON that _tables.py is generated from,
|
|
26
|
+
# and that data lives in the workspace root, outside this project. uv_build cannot include files
|
|
27
|
+
# outside the project; hatchling's force-include can, and fails the build when the folder is
|
|
28
|
+
# missing (ADR-0011).
|
|
29
|
+
requires = ["hatchling==1.27.0"]
|
|
30
|
+
build-backend = "hatchling.build"
|
|
31
|
+
|
|
32
|
+
[tool.hatch.build.targets.wheel]
|
|
33
|
+
packages = ["src/nepdate_patro"]
|
|
34
|
+
|
|
35
|
+
[tool.hatch.build.targets.sdist]
|
|
36
|
+
only-include = ["src", "LICENSE", "NOTICE", "README.md"]
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.sdist.force-include]
|
|
39
|
+
"../../shared/data/patro" = "shared/data/patro"
|
|
40
|
+
|
|
41
|
+
[tool.uv.sources]
|
|
42
|
+
nepdate-core = { workspace = true }
|