Loglan-Core 0.2.4__tar.gz → 0.2.6__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.
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/LICENSE +21 -21
- {Loglan-Core-0.2.4 → loglan_core-0.2.6/Loglan_Core.egg-info}/PKG-INFO +72 -72
- {Loglan-Core-0.2.4/Loglan_Core.egg-info → loglan_core-0.2.6}/PKG-INFO +72 -72
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/README.md +48 -48
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/__init__.py +25 -25
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/__init__.py +3 -3
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/base_selector.py +79 -79
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/definition_selector.py +137 -137
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/export_word_converter.py +105 -105
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/exporter.py +229 -229
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/key_selector.py +122 -122
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/word_linker.py +112 -112
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/word_selector.py +199 -199
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/addons/word_sourcer.py +174 -174
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/author.py +125 -125
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/base.py +267 -267
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/connect_tables.py +106 -106
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/definition.py +166 -166
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/event.py +152 -152
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/key.py +121 -121
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/setting.py +67 -67
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/syllable.py +61 -61
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/table_names.py +41 -41
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/type.py +109 -109
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/word.py +340 -340
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/word_source.py +71 -71
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/loglan_core/word_spell.py +8 -8
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/pyproject.toml +9 -9
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/setup.cfg +7 -7
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/setup.py +47 -47
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/Loglan_Core.egg-info/SOURCES.txt +0 -0
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/Loglan_Core.egg-info/dependency_links.txt +0 -0
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/Loglan_Core.egg-info/requires.txt +0 -0
- {Loglan-Core-0.2.4 → loglan_core-0.2.6}/Loglan_Core.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 torrua
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 torrua
|
|
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.
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: Loglan-Core
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Loglan Dictionary Database Model for SQLAlchemy
|
|
5
|
-
Home-page: https://github.com/torrua/loglan_core
|
|
6
|
-
Download-URL: https://github.com/torrua/loglan_core/archive/0.2.
|
|
7
|
-
Author: torrua
|
|
8
|
-
Author-email: torrua@gmail.com
|
|
9
|
-
License: MIT
|
|
10
|
-
Keywords: Loglan,Dictionary,Database,Model,LOD
|
|
11
|
-
Classifier: Development Status ::
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: Topic :: Database
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Requires-Python: >=3.10
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
Requires-Dist: sqlalchemy>=2.0.21
|
|
23
|
-
|
|
24
|
-
# Loglan Core
|
|
25
|
-
|
|
26
|
-

|
|
27
|
-

|
|
28
|
-

|
|
29
|
-
[](https://github.com/torrua/loglan_core/actions/workflows/pylint.yml)
|
|
30
|
-
[](https://github.com/torrua/loglan_core/actions/workflows/pytest.yml)
|
|
31
|
-

|
|
32
|
-

|
|
33
|
-

|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
# SQLAlchemy Database Model for Loglan Dictionary
|
|
38
|
-
|
|
39
|
-
This project represent a SQLAlchemy database model for the dictionary of [constructed language Loglan](http://www.loglan.org/).
|
|
40
|
-
It contains schemas for information about words, authors, lexical events, and even more.
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
## Features
|
|
45
|
-
Provides a structured SQLAlchemy model for the Loglan dictionary.
|
|
46
|
-
Includes classes for handling words, authors, lexical events, and more.
|
|
47
|
-
Can be easily integrated into Python projects to provide Loglan language support.
|
|
48
|
-
|
|
49
|
-
## Prerequisites
|
|
50
|
-
|
|
51
|
-
Before installing, ensure you have the following software installed on your system:
|
|
52
|
-
|
|
53
|
-
- Python 3.10+
|
|
54
|
-
- pip (Python package manager)
|
|
55
|
-
|
|
56
|
-
## Installation
|
|
57
|
-
You can install Loglan-Core using pip:
|
|
58
|
-
```bash
|
|
59
|
-
pip install Loglan-Core
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Usage
|
|
63
|
-
After installing the package, you can use it as follows:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
from loglan_core import Word, Type, Event, Key
|
|
67
|
-
# your code here...
|
|
68
|
-
```
|
|
69
|
-
For more details please see [Intro](examples/intro.md), [Word](examples/word.md) and [WordSelector](examples/word_selector.md) documentation with examples.
|
|
70
|
-
|
|
71
|
-
## License
|
|
72
|
-
Loglan-Core is licensed under the MIT license.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: Loglan-Core
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Loglan Dictionary Database Model for SQLAlchemy
|
|
5
|
+
Home-page: https://github.com/torrua/loglan_core
|
|
6
|
+
Download-URL: https://github.com/torrua/loglan_core/archive/0.2.6.tar.gz
|
|
7
|
+
Author: torrua
|
|
8
|
+
Author-email: torrua@gmail.com
|
|
9
|
+
License: MIT
|
|
10
|
+
Keywords: Loglan,Dictionary,Database,Model,LOD
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Database
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: sqlalchemy>=2.0.21
|
|
23
|
+
|
|
24
|
+
# Loglan Core
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+
[](https://github.com/torrua/loglan_core/actions/workflows/pylint.yml)
|
|
30
|
+
[](https://github.com/torrua/loglan_core/actions/workflows/pytest.yml)
|
|
31
|
+

|
|
32
|
+

|
|
33
|
+

|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# SQLAlchemy Database Model for Loglan Dictionary
|
|
38
|
+
|
|
39
|
+
This project represent a SQLAlchemy database model for the dictionary of [constructed language Loglan](http://www.loglan.org/).
|
|
40
|
+
It contains schemas for information about words, authors, lexical events, and even more.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
Provides a structured SQLAlchemy model for the Loglan dictionary.
|
|
46
|
+
Includes classes for handling words, authors, lexical events, and more.
|
|
47
|
+
Can be easily integrated into Python projects to provide Loglan language support.
|
|
48
|
+
|
|
49
|
+
## Prerequisites
|
|
50
|
+
|
|
51
|
+
Before installing, ensure you have the following software installed on your system:
|
|
52
|
+
|
|
53
|
+
- Python 3.10+
|
|
54
|
+
- pip (Python package manager)
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
You can install Loglan-Core using pip:
|
|
58
|
+
```bash
|
|
59
|
+
pip install Loglan-Core
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
After installing the package, you can use it as follows:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
from loglan_core import Word, Type, Event, Key
|
|
67
|
+
# your code here...
|
|
68
|
+
```
|
|
69
|
+
For more details please see [Intro](examples/intro.md), [Word](examples/word.md) and [WordSelector](examples/word_selector.md) documentation with examples.
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
Loglan-Core is licensed under the MIT license.
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: Loglan-Core
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Loglan Dictionary Database Model for SQLAlchemy
|
|
5
|
-
Home-page: https://github.com/torrua/loglan_core
|
|
6
|
-
Download-URL: https://github.com/torrua/loglan_core/archive/0.2.
|
|
7
|
-
Author: torrua
|
|
8
|
-
Author-email: torrua@gmail.com
|
|
9
|
-
License: MIT
|
|
10
|
-
Keywords: Loglan,Dictionary,Database,Model,LOD
|
|
11
|
-
Classifier: Development Status ::
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: Topic :: Database
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Requires-Python: >=3.10
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
Requires-Dist: sqlalchemy>=2.0.21
|
|
23
|
-
|
|
24
|
-
# Loglan Core
|
|
25
|
-
|
|
26
|
-

|
|
27
|
-

|
|
28
|
-

|
|
29
|
-
[](https://github.com/torrua/loglan_core/actions/workflows/pylint.yml)
|
|
30
|
-
[](https://github.com/torrua/loglan_core/actions/workflows/pytest.yml)
|
|
31
|
-

|
|
32
|
-

|
|
33
|
-

|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
# SQLAlchemy Database Model for Loglan Dictionary
|
|
38
|
-
|
|
39
|
-
This project represent a SQLAlchemy database model for the dictionary of [constructed language Loglan](http://www.loglan.org/).
|
|
40
|
-
It contains schemas for information about words, authors, lexical events, and even more.
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
## Features
|
|
45
|
-
Provides a structured SQLAlchemy model for the Loglan dictionary.
|
|
46
|
-
Includes classes for handling words, authors, lexical events, and more.
|
|
47
|
-
Can be easily integrated into Python projects to provide Loglan language support.
|
|
48
|
-
|
|
49
|
-
## Prerequisites
|
|
50
|
-
|
|
51
|
-
Before installing, ensure you have the following software installed on your system:
|
|
52
|
-
|
|
53
|
-
- Python 3.10+
|
|
54
|
-
- pip (Python package manager)
|
|
55
|
-
|
|
56
|
-
## Installation
|
|
57
|
-
You can install Loglan-Core using pip:
|
|
58
|
-
```bash
|
|
59
|
-
pip install Loglan-Core
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Usage
|
|
63
|
-
After installing the package, you can use it as follows:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
from loglan_core import Word, Type, Event, Key
|
|
67
|
-
# your code here...
|
|
68
|
-
```
|
|
69
|
-
For more details please see [Intro](examples/intro.md), [Word](examples/word.md) and [WordSelector](examples/word_selector.md) documentation with examples.
|
|
70
|
-
|
|
71
|
-
## License
|
|
72
|
-
Loglan-Core is licensed under the MIT license.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: Loglan-Core
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Loglan Dictionary Database Model for SQLAlchemy
|
|
5
|
+
Home-page: https://github.com/torrua/loglan_core
|
|
6
|
+
Download-URL: https://github.com/torrua/loglan_core/archive/0.2.6.tar.gz
|
|
7
|
+
Author: torrua
|
|
8
|
+
Author-email: torrua@gmail.com
|
|
9
|
+
License: MIT
|
|
10
|
+
Keywords: Loglan,Dictionary,Database,Model,LOD
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Database
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: sqlalchemy>=2.0.21
|
|
23
|
+
|
|
24
|
+
# Loglan Core
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+
[](https://github.com/torrua/loglan_core/actions/workflows/pylint.yml)
|
|
30
|
+
[](https://github.com/torrua/loglan_core/actions/workflows/pytest.yml)
|
|
31
|
+

|
|
32
|
+

|
|
33
|
+

|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# SQLAlchemy Database Model for Loglan Dictionary
|
|
38
|
+
|
|
39
|
+
This project represent a SQLAlchemy database model for the dictionary of [constructed language Loglan](http://www.loglan.org/).
|
|
40
|
+
It contains schemas for information about words, authors, lexical events, and even more.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
Provides a structured SQLAlchemy model for the Loglan dictionary.
|
|
46
|
+
Includes classes for handling words, authors, lexical events, and more.
|
|
47
|
+
Can be easily integrated into Python projects to provide Loglan language support.
|
|
48
|
+
|
|
49
|
+
## Prerequisites
|
|
50
|
+
|
|
51
|
+
Before installing, ensure you have the following software installed on your system:
|
|
52
|
+
|
|
53
|
+
- Python 3.10+
|
|
54
|
+
- pip (Python package manager)
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
You can install Loglan-Core using pip:
|
|
58
|
+
```bash
|
|
59
|
+
pip install Loglan-Core
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
After installing the package, you can use it as follows:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
from loglan_core import Word, Type, Event, Key
|
|
67
|
+
# your code here...
|
|
68
|
+
```
|
|
69
|
+
For more details please see [Intro](examples/intro.md), [Word](examples/word.md) and [WordSelector](examples/word_selector.md) documentation with examples.
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
Loglan-Core is licensed under the MIT license.
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# Loglan Core
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-

|
|
6
|
-
[](https://github.com/torrua/loglan_core/actions/workflows/pylint.yml)
|
|
7
|
-
[](https://github.com/torrua/loglan_core/actions/workflows/pytest.yml)
|
|
8
|
-

|
|
9
|
-

|
|
10
|
-

|
|
11
|
-

|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# SQLAlchemy Database Model for Loglan Dictionary
|
|
15
|
-
|
|
16
|
-
This project represent a SQLAlchemy database model for the dictionary of [constructed language Loglan](http://www.loglan.org/).
|
|
17
|
-
It contains schemas for information about words, authors, lexical events, and even more.
|
|
18
|
-
|
|
19
|
-

|
|
20
|
-
|
|
21
|
-
## Features
|
|
22
|
-
Provides a structured SQLAlchemy model for the Loglan dictionary.
|
|
23
|
-
Includes classes for handling words, authors, lexical events, and more.
|
|
24
|
-
Can be easily integrated into Python projects to provide Loglan language support.
|
|
25
|
-
|
|
26
|
-
## Prerequisites
|
|
27
|
-
|
|
28
|
-
Before installing, ensure you have the following software installed on your system:
|
|
29
|
-
|
|
30
|
-
- Python 3.10+
|
|
31
|
-
- pip (Python package manager)
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
You can install Loglan-Core using pip:
|
|
35
|
-
```bash
|
|
36
|
-
pip install Loglan-Core
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Usage
|
|
40
|
-
After installing the package, you can use it as follows:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
from loglan_core import Word, Type, Event, Key
|
|
44
|
-
# your code here...
|
|
45
|
-
```
|
|
46
|
-
For more details please see [Intro](examples/intro.md), [Word](examples/word.md) and [WordSelector](examples/word_selector.md) documentation with examples.
|
|
47
|
-
|
|
48
|
-
## License
|
|
1
|
+
# Loglan Core
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
[](https://github.com/torrua/loglan_core/actions/workflows/pylint.yml)
|
|
7
|
+
[](https://github.com/torrua/loglan_core/actions/workflows/pytest.yml)
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# SQLAlchemy Database Model for Loglan Dictionary
|
|
15
|
+
|
|
16
|
+
This project represent a SQLAlchemy database model for the dictionary of [constructed language Loglan](http://www.loglan.org/).
|
|
17
|
+
It contains schemas for information about words, authors, lexical events, and even more.
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
Provides a structured SQLAlchemy model for the Loglan dictionary.
|
|
23
|
+
Includes classes for handling words, authors, lexical events, and more.
|
|
24
|
+
Can be easily integrated into Python projects to provide Loglan language support.
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
Before installing, ensure you have the following software installed on your system:
|
|
29
|
+
|
|
30
|
+
- Python 3.10+
|
|
31
|
+
- pip (Python package manager)
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
You can install Loglan-Core using pip:
|
|
35
|
+
```bash
|
|
36
|
+
pip install Loglan-Core
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
After installing the package, you can use it as follows:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
from loglan_core import Word, Type, Event, Key
|
|
44
|
+
# your code here...
|
|
45
|
+
```
|
|
46
|
+
For more details please see [Intro](examples/intro.md), [Word](examples/word.md) and [WordSelector](examples/word_selector.md) documentation with examples.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
49
|
Loglan-Core is licensed under the MIT license.
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Main point for export DB models
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
__author__ = "torrua"
|
|
6
|
-
__copyright__ = "Copyright 2024, loglan_core project"
|
|
7
|
-
__email__ = "torrua@gmail.com"
|
|
8
|
-
|
|
9
|
-
from loglan_core.author import BaseAuthor as Author
|
|
10
|
-
from loglan_core.connect_tables import (
|
|
11
|
-
t_connect_authors,
|
|
12
|
-
t_connect_words,
|
|
13
|
-
t_connect_keys,
|
|
14
|
-
)
|
|
15
|
-
from loglan_core.definition import BaseDefinition as Definition
|
|
16
|
-
from loglan_core.event import BaseEvent as Event
|
|
17
|
-
from loglan_core.key import BaseKey as Key
|
|
18
|
-
from loglan_core.setting import BaseSetting as Setting
|
|
19
|
-
from loglan_core.syllable import BaseSyllable as Syllable
|
|
20
|
-
from loglan_core.type import BaseType as Type
|
|
21
|
-
from loglan_core.word import BaseWord as Word
|
|
22
|
-
from loglan_core.word_source import BaseWordSource as WordSource
|
|
23
|
-
from loglan_core.word_spell import BaseWordSpell as WordSpell
|
|
24
|
-
from loglan_core.base import BaseModel as Base
|
|
25
|
-
from loglan_core.addons.word_selector import WordSelector
|
|
1
|
+
"""
|
|
2
|
+
Main point for export DB models
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
__author__ = "torrua"
|
|
6
|
+
__copyright__ = "Copyright 2024, loglan_core project"
|
|
7
|
+
__email__ = "torrua@gmail.com"
|
|
8
|
+
|
|
9
|
+
from loglan_core.author import BaseAuthor as Author
|
|
10
|
+
from loglan_core.connect_tables import (
|
|
11
|
+
t_connect_authors,
|
|
12
|
+
t_connect_words,
|
|
13
|
+
t_connect_keys,
|
|
14
|
+
)
|
|
15
|
+
from loglan_core.definition import BaseDefinition as Definition
|
|
16
|
+
from loglan_core.event import BaseEvent as Event
|
|
17
|
+
from loglan_core.key import BaseKey as Key
|
|
18
|
+
from loglan_core.setting import BaseSetting as Setting
|
|
19
|
+
from loglan_core.syllable import BaseSyllable as Syllable
|
|
20
|
+
from loglan_core.type import BaseType as Type
|
|
21
|
+
from loglan_core.word import BaseWord as Word
|
|
22
|
+
from loglan_core.word_source import BaseWordSource as WordSource
|
|
23
|
+
from loglan_core.word_spell import BaseWordSpell as WordSpell
|
|
24
|
+
from loglan_core.base import BaseModel as Base
|
|
25
|
+
from loglan_core.addons.word_selector import WordSelector
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This module contains an addons for BaseModels
|
|
3
|
-
"""
|
|
1
|
+
"""
|
|
2
|
+
This module contains an addons for BaseModels
|
|
3
|
+
"""
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This module provides a base selector for SQLAlchemy
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from sqlalchemy import Select
|
|
8
|
-
from sqlalchemy.orm import Session
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class BaseSelector(Select): # pylint: disable=too-many-ancestors
|
|
12
|
-
"""
|
|
13
|
-
A custom base selector that inherits from SQLAlchemy's Select class.
|
|
14
|
-
This class provides methods to execute a session and fetch results
|
|
15
|
-
in different ways. It also provides a way to fetch many results.
|
|
16
|
-
|
|
17
|
-
Methods:
|
|
18
|
-
--------
|
|
19
|
-
execute(session: Session) -> ResultProxy:
|
|
20
|
-
Executes the session and returns the result.
|
|
21
|
-
|
|
22
|
-
all(session: Session) -> List[ResultRow]:
|
|
23
|
-
Executes the session and returns all the results.
|
|
24
|
-
|
|
25
|
-
scalar(session: Session) -> Any:
|
|
26
|
-
Executes the session and returns a scalar result.
|
|
27
|
-
|
|
28
|
-
fetchmany(session: Session, size: int | None = None) -> List[ResultRow]:
|
|
29
|
-
Executes the session and fetches a specified number of results.
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
def execute(self, session: Session):
|
|
33
|
-
"""
|
|
34
|
-
Executes the given session and returns the result.
|
|
35
|
-
|
|
36
|
-
Args:
|
|
37
|
-
session (Session): SQLAlchemy Session object.
|
|
38
|
-
|
|
39
|
-
Returns:
|
|
40
|
-
ResultProxy: The result of the executed session.
|
|
41
|
-
"""
|
|
42
|
-
return session.execute(self)
|
|
43
|
-
|
|
44
|
-
def all(self, session: Session):
|
|
45
|
-
"""
|
|
46
|
-
Executes the given session and returns all the results as a list.
|
|
47
|
-
|
|
48
|
-
Args:
|
|
49
|
-
session (Session): SQLAlchemy Session object.
|
|
50
|
-
|
|
51
|
-
Returns:
|
|
52
|
-
List[ResultRow]: All the results of the executed session.
|
|
53
|
-
"""
|
|
54
|
-
return self.execute(session).scalars().all()
|
|
55
|
-
|
|
56
|
-
def scalar(self, session: Session):
|
|
57
|
-
"""
|
|
58
|
-
Executes the given session and returns a scalar result.
|
|
59
|
-
|
|
60
|
-
Args:
|
|
61
|
-
session (Session): SQLAlchemy Session object.
|
|
62
|
-
|
|
63
|
-
Returns:
|
|
64
|
-
Any: The scalar result of the executed session.
|
|
65
|
-
"""
|
|
66
|
-
return self.execute(session).scalar()
|
|
67
|
-
|
|
68
|
-
def fetchmany(self, session: Session, size: int | None = None):
|
|
69
|
-
"""
|
|
70
|
-
Executes the given session and fetches a specified number of results.
|
|
71
|
-
|
|
72
|
-
Args:
|
|
73
|
-
session (Session): SQLAlchemy Session object.
|
|
74
|
-
size (int, optional): Number of results to fetch. If None, fetches all results.
|
|
75
|
-
|
|
76
|
-
Returns:
|
|
77
|
-
List[ResultRow]: The fetched results.
|
|
78
|
-
"""
|
|
79
|
-
return self.execute(session).scalars().fetchmany(size)
|
|
1
|
+
"""
|
|
2
|
+
This module provides a base selector for SQLAlchemy
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from sqlalchemy import Select
|
|
8
|
+
from sqlalchemy.orm import Session
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BaseSelector(Select): # pylint: disable=too-many-ancestors
|
|
12
|
+
"""
|
|
13
|
+
A custom base selector that inherits from SQLAlchemy's Select class.
|
|
14
|
+
This class provides methods to execute a session and fetch results
|
|
15
|
+
in different ways. It also provides a way to fetch many results.
|
|
16
|
+
|
|
17
|
+
Methods:
|
|
18
|
+
--------
|
|
19
|
+
execute(session: Session) -> ResultProxy:
|
|
20
|
+
Executes the session and returns the result.
|
|
21
|
+
|
|
22
|
+
all(session: Session) -> List[ResultRow]:
|
|
23
|
+
Executes the session and returns all the results.
|
|
24
|
+
|
|
25
|
+
scalar(session: Session) -> Any:
|
|
26
|
+
Executes the session and returns a scalar result.
|
|
27
|
+
|
|
28
|
+
fetchmany(session: Session, size: int | None = None) -> List[ResultRow]:
|
|
29
|
+
Executes the session and fetches a specified number of results.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def execute(self, session: Session):
|
|
33
|
+
"""
|
|
34
|
+
Executes the given session and returns the result.
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
session (Session): SQLAlchemy Session object.
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
ResultProxy: The result of the executed session.
|
|
41
|
+
"""
|
|
42
|
+
return session.execute(self)
|
|
43
|
+
|
|
44
|
+
def all(self, session: Session):
|
|
45
|
+
"""
|
|
46
|
+
Executes the given session and returns all the results as a list.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
session (Session): SQLAlchemy Session object.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
List[ResultRow]: All the results of the executed session.
|
|
53
|
+
"""
|
|
54
|
+
return self.execute(session).scalars().all()
|
|
55
|
+
|
|
56
|
+
def scalar(self, session: Session):
|
|
57
|
+
"""
|
|
58
|
+
Executes the given session and returns a scalar result.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
session (Session): SQLAlchemy Session object.
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
Any: The scalar result of the executed session.
|
|
65
|
+
"""
|
|
66
|
+
return self.execute(session).scalar()
|
|
67
|
+
|
|
68
|
+
def fetchmany(self, session: Session, size: int | None = None):
|
|
69
|
+
"""
|
|
70
|
+
Executes the given session and fetches a specified number of results.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
session (Session): SQLAlchemy Session object.
|
|
74
|
+
size (int, optional): Number of results to fetch. If None, fetches all results.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
List[ResultRow]: The fetched results.
|
|
78
|
+
"""
|
|
79
|
+
return self.execute(session).scalars().fetchmany(size)
|