nuva-core 2.0.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.
@@ -0,0 +1,19 @@
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: nuva-core
3
+ Version: 2.0.0b1
4
+ Summary: Python SDK for NUVA, the unified vaccine nomenclature
5
+ Author-email: Syadem <developers@mesvaccins.net>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://nuva.fr
8
+ Project-URL: Documentation, https://docs.nuva.mesvaccins.net
9
+ Project-URL: Repository, https://github.com/Syadem/nuva-libs
10
+ Keywords: vaccine,vaccination,nomenclature,healthcare,immunization
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Healthcare Industry
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: protobuf>=5.28.2
20
+ Requires-Dist: rapidfuzz>=3
21
+ Requires-Dist: requests>=2.25
22
+ Provides-Extra: test
23
+ Requires-Dist: pytest>=8; extra == "test"
24
+ Dynamic: license-file
25
+
26
+ # NUVA Python SDK
27
+
28
+ A Python library to read the NUVA vaccine nomenclature: vaccines, valences, valence types and diseases.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install --pre nuva-core
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from nuva import Nuva
40
+
41
+ nuva = Nuva.load(["fr"])["fr"]
42
+
43
+ vaccines = nuva.repositories.vaccines
44
+ act_hib = vaccines.find(1)
45
+ same_atc = vaccines.find_by_code("ATC", "J07AG01")
46
+ generic = nuva.queries.generic_vaccine_by_vaccine.call(act_hib)
47
+ ```
48
+
49
+ `Nuva.load` downloads the latest version published on `https://core.nuva.fr` and returns one database per
50
+ language (`en`, `fr`, `de`, `lv`, `gr`, `pl`). Pass `cdn_url`, `hash` or `session` to use another CDN, a given version
51
+ or your own `requests.Session` (for a proxy, for instance). `Nuva.load_from_file` reads a local dump.
52
+
53
+ `Nuva.watch_latest_version(on_update)` polls the CDN in a background thread and calls `on_update` with the hash of
54
+ each new version.
55
+
56
+ ### Repositories
57
+
58
+ `nuva.repositories` holds `vaccines`, `diseases`, `valences` and `valence_types`. Each one exposes `all()`,
59
+ `find(id)` (integer ID or SYADEM UUID) and `by_ids(ids)`. `find_by_code(nomenclature, value)` returns every vaccine,
60
+ disease or valence carrying a code, since a code may be shared. `valences.get_ancestor_ids(id)` lists the ancestors
61
+ of a valence from the root.
62
+
63
+ Entities are protobuf messages: use `HasField("generic_vaccine_id")` to tell an absent optional field from its
64
+ default value.
65
+
66
+ ### Queries
67
+
68
+ Each query of `nuva.queries` is called with `.call(...)`:
69
+
70
+ | Query | Argument | Result |
71
+ | --- | --- | --- |
72
+ | `valences_by_vaccine`, `diseases_by_vaccine` | vaccine | valences, diseases |
73
+ | `vaccines_by_valence`, `diseases_by_valence` | valence | vaccines, diseases |
74
+ | `valences_by_disease`, `vaccines_by_disease` | disease | valences, vaccines |
75
+ | `generic_vaccine_by_vaccine` | commercial vaccine | its generic vaccine, or `None` |
76
+ | `commercial_vaccines_by_generic_vaccine` | generic vaccine | its commercial vaccines |
77
+ | `valence_type_by_valence` | valence | its type, or `None` |
78
+ | `vaccine_fuzzy_search` | text | vaccines whose name matches, best first |
79
+ | `lookup_equivalent_vaccines` | vaccine | vaccines with the same valences |
80
+ | `lookup_generalized_vaccines` | vaccine | generic vaccines with the same or broader valences |
81
+ | `lookup_specialized_vaccines` | vaccine | vaccines with the same or narrower valences |
82
+ | `all_nomenclatures` | | vaccine nomenclatures |
83
+ | `all_code_by_nomenclature` | | vaccine codes by nomenclature |
84
+
85
+ ## Development
86
+
87
+ ```bash
88
+ pip install -e ".[test]"
89
+ pytest
90
+ ```
91
+
92
+ The protobuf modules in `nuva/protobuf` are generated by `gen_proto.sh` from the schemas in `../nuva`.
93
+
94
+ ## License
95
+
96
+ MIT
@@ -0,0 +1,71 @@
1
+ # NUVA Python SDK
2
+
3
+ A Python library to read the NUVA vaccine nomenclature: vaccines, valences, valence types and diseases.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install --pre nuva-core
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from nuva import Nuva
15
+
16
+ nuva = Nuva.load(["fr"])["fr"]
17
+
18
+ vaccines = nuva.repositories.vaccines
19
+ act_hib = vaccines.find(1)
20
+ same_atc = vaccines.find_by_code("ATC", "J07AG01")
21
+ generic = nuva.queries.generic_vaccine_by_vaccine.call(act_hib)
22
+ ```
23
+
24
+ `Nuva.load` downloads the latest version published on `https://core.nuva.fr` and returns one database per
25
+ language (`en`, `fr`, `de`, `lv`, `gr`, `pl`). Pass `cdn_url`, `hash` or `session` to use another CDN, a given version
26
+ or your own `requests.Session` (for a proxy, for instance). `Nuva.load_from_file` reads a local dump.
27
+
28
+ `Nuva.watch_latest_version(on_update)` polls the CDN in a background thread and calls `on_update` with the hash of
29
+ each new version.
30
+
31
+ ### Repositories
32
+
33
+ `nuva.repositories` holds `vaccines`, `diseases`, `valences` and `valence_types`. Each one exposes `all()`,
34
+ `find(id)` (integer ID or SYADEM UUID) and `by_ids(ids)`. `find_by_code(nomenclature, value)` returns every vaccine,
35
+ disease or valence carrying a code, since a code may be shared. `valences.get_ancestor_ids(id)` lists the ancestors
36
+ of a valence from the root.
37
+
38
+ Entities are protobuf messages: use `HasField("generic_vaccine_id")` to tell an absent optional field from its
39
+ default value.
40
+
41
+ ### Queries
42
+
43
+ Each query of `nuva.queries` is called with `.call(...)`:
44
+
45
+ | Query | Argument | Result |
46
+ | --- | --- | --- |
47
+ | `valences_by_vaccine`, `diseases_by_vaccine` | vaccine | valences, diseases |
48
+ | `vaccines_by_valence`, `diseases_by_valence` | valence | vaccines, diseases |
49
+ | `valences_by_disease`, `vaccines_by_disease` | disease | valences, vaccines |
50
+ | `generic_vaccine_by_vaccine` | commercial vaccine | its generic vaccine, or `None` |
51
+ | `commercial_vaccines_by_generic_vaccine` | generic vaccine | its commercial vaccines |
52
+ | `valence_type_by_valence` | valence | its type, or `None` |
53
+ | `vaccine_fuzzy_search` | text | vaccines whose name matches, best first |
54
+ | `lookup_equivalent_vaccines` | vaccine | vaccines with the same valences |
55
+ | `lookup_generalized_vaccines` | vaccine | generic vaccines with the same or broader valences |
56
+ | `lookup_specialized_vaccines` | vaccine | vaccines with the same or narrower valences |
57
+ | `all_nomenclatures` | | vaccine nomenclatures |
58
+ | `all_code_by_nomenclature` | | vaccine codes by nomenclature |
59
+
60
+ ## Development
61
+
62
+ ```bash
63
+ pip install -e ".[test]"
64
+ pytest
65
+ ```
66
+
67
+ The protobuf modules in `nuva/protobuf` are generated by `gen_proto.sh` from the schemas in `../nuva`.
68
+
69
+ ## License
70
+
71
+ MIT
@@ -0,0 +1,12 @@
1
+ from .nuva import DEFAULT_CDN_URL, SCHEMA_VERSION, Nuva, Queries, Repositories, UnsupportedSchemaVersionError
2
+ from .protobuf.Code_pb2 import Code
3
+ from .protobuf.Disease_pb2 import Disease
4
+ from .protobuf.InjectionMethod_pb2 import InjectionMethod
5
+ from .protobuf.NuvaDatabase_pb2 import NuvaDatabase
6
+ from .protobuf.Vaccine_pb2 import Vaccine
7
+ from .protobuf.Valence_pb2 import Valence
8
+ from .protobuf.ValenceType_pb2 import ValenceType
9
+ from .repository import CodedRepository, Repository, ValenceRepository
10
+ from .version_watcher import VersionWatcher
11
+
12
+ __version__ = "2.0.0b1"
@@ -0,0 +1,136 @@
1
+ import json
2
+ from dataclasses import dataclass
3
+
4
+ import requests
5
+
6
+ from . import queries
7
+ from .protobuf.NuvaDatabase_pb2 import NuvaDatabase
8
+ from .repository import CodedRepository, Repository, ValenceRepository
9
+ from .version_watcher import VersionWatcher
10
+
11
+ SCHEMA_VERSION = 2
12
+ DEFAULT_CDN_URL = "https://core.nuva.fr"
13
+ HTTP_TIMEOUT = 60
14
+
15
+
16
+ class UnsupportedSchemaVersionError(Exception):
17
+ pass
18
+
19
+
20
+ @dataclass(frozen=True)
21
+ class Repositories:
22
+ vaccines: CodedRepository
23
+ diseases: CodedRepository
24
+ valences: ValenceRepository
25
+ valence_types: Repository
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class Queries:
30
+ valences_by_vaccine: queries.ValencesByVaccineQuery
31
+ vaccines_by_valence: queries.VaccinesByValenceQuery
32
+ valences_by_disease: queries.ValencesByDiseaseQuery
33
+ diseases_by_valence: queries.DiseasesByValenceQuery
34
+ vaccines_by_disease: queries.VaccinesByDiseaseQuery
35
+ diseases_by_vaccine: queries.DiseasesByVaccineQuery
36
+ generic_vaccine_by_vaccine: queries.GenericVaccineByVaccineQuery
37
+ commercial_vaccines_by_generic_vaccine: queries.CommercialVaccinesByGenericVaccineQuery
38
+ valence_type_by_valence: queries.ValenceTypeByValenceQuery
39
+ vaccine_fuzzy_search: queries.VaccineFuzzySearchQuery
40
+ lookup_equivalent_vaccines: queries.LookupEquivalentVaccinesQuery
41
+ lookup_generalized_vaccines: queries.LookupGeneralizedVaccinesQuery
42
+ lookup_specialized_vaccines: queries.LookupSpecializedVaccinesQuery
43
+ all_nomenclatures: queries.AllNomenclaturesQuery
44
+ all_code_by_nomenclature: queries.AllCodeByNomenclatureQuery
45
+
46
+
47
+ class Nuva:
48
+ def __init__(self, db):
49
+ if db.schema_version != SCHEMA_VERSION:
50
+ raise UnsupportedSchemaVersionError(
51
+ f"Unsupported NUVA schema version {db.schema_version}, expected {SCHEMA_VERSION}"
52
+ )
53
+
54
+ self.db = db
55
+
56
+ self.repositories = Repositories(
57
+ vaccines=CodedRepository(db.vaccines),
58
+ diseases=CodedRepository(db.diseases),
59
+ valences=ValenceRepository(db.valences),
60
+ valence_types=Repository(db.valence_types),
61
+ )
62
+
63
+ valences_by_vaccine = queries.ValencesByVaccineQuery(self.repositories)
64
+ vaccines_by_valence = queries.VaccinesByValenceQuery(self.repositories)
65
+ valences_by_disease = queries.ValencesByDiseaseQuery(self.repositories)
66
+ diseases_by_valence = queries.DiseasesByValenceQuery(self.repositories)
67
+
68
+ self.queries = Queries(
69
+ valences_by_vaccine=valences_by_vaccine,
70
+ vaccines_by_valence=vaccines_by_valence,
71
+ valences_by_disease=valences_by_disease,
72
+ diseases_by_valence=diseases_by_valence,
73
+ vaccines_by_disease=queries.VaccinesByDiseaseQuery(valences_by_disease, vaccines_by_valence),
74
+ diseases_by_vaccine=queries.DiseasesByVaccineQuery(valences_by_vaccine, diseases_by_valence),
75
+ generic_vaccine_by_vaccine=queries.GenericVaccineByVaccineQuery(self.repositories),
76
+ commercial_vaccines_by_generic_vaccine=queries.CommercialVaccinesByGenericVaccineQuery(self.repositories),
77
+ valence_type_by_valence=queries.ValenceTypeByValenceQuery(self.repositories),
78
+ vaccine_fuzzy_search=queries.VaccineFuzzySearchQuery(self.repositories),
79
+ lookup_equivalent_vaccines=queries.LookupEquivalentVaccinesQuery(self.repositories),
80
+ lookup_generalized_vaccines=queries.LookupGeneralizedVaccinesQuery(self.repositories),
81
+ lookup_specialized_vaccines=queries.LookupSpecializedVaccinesQuery(self.repositories),
82
+ all_nomenclatures=queries.AllNomenclaturesQuery(self.repositories),
83
+ all_code_by_nomenclature=queries.AllCodeByNomenclatureQuery(self.repositories),
84
+ )
85
+
86
+ @property
87
+ def version(self):
88
+ return self.db.version
89
+
90
+ @property
91
+ def generated_at(self):
92
+ return self.db.generated_at
93
+
94
+ @property
95
+ def locale(self):
96
+ return self.db.locale
97
+
98
+ def __repr__(self):
99
+ version = self.version
100
+ repositories = self.repositories
101
+ return (
102
+ f"<Nuva version={version.major}.{version.minor}.{version.patch} locale={self.locale} "
103
+ f"vaccine_count={len(repositories.vaccines.all())} disease_count={len(repositories.diseases.all())} "
104
+ f"valence_count={len(repositories.valences.all())} valence_type_count={len(repositories.valence_types.all())}>"
105
+ )
106
+
107
+ @classmethod
108
+ def load(cls, langs, cdn_url=DEFAULT_CDN_URL, hash=None, session=requests):
109
+ if hash is None:
110
+ hash = cls.fetch_latest_version_hash(cdn_url, session)
111
+
112
+ return {lang: cls(NuvaDatabase.FromString(_get(session, f"{cdn_url}/dumps/{hash}_{lang}.db"))) for lang in langs}
113
+
114
+ @classmethod
115
+ def fetch_latest_version_hash(cls, cdn_url=DEFAULT_CDN_URL, session=requests):
116
+ return json.loads(_get(session, f"{cdn_url}/versions/latest.json"))["hash"]
117
+
118
+ @classmethod
119
+ def watch_latest_version(cls, on_update, cdn_url=DEFAULT_CDN_URL, on_error=None, polling_interval=60, session=requests):
120
+ return VersionWatcher(
121
+ fetch_latest_version_hash=lambda: cls.fetch_latest_version_hash(cdn_url, session),
122
+ polling_interval=polling_interval,
123
+ on_update=on_update,
124
+ on_error=on_error,
125
+ ).start()
126
+
127
+ @classmethod
128
+ def load_from_file(cls, path):
129
+ with open(path, "rb") as file:
130
+ return cls(NuvaDatabase.FromString(file.read()))
131
+
132
+
133
+ def _get(session, url):
134
+ response = session.get(url, timeout=HTTP_TIMEOUT)
135
+ response.raise_for_status()
136
+ return response.content
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: Code.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'Code.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nCode.proto\x12\x04nuva\"+\n\x04\x43ode\x12\x14\n\x0cnomenclature\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'Code_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
35
+ _globals['_CODE']._serialized_start=20
36
+ _globals['_CODE']._serialized_end=63
37
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,39 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: Disease.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'Disease.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+ from . import Code_pb2 as Code__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rDisease.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\nCode.proto\"\xb3\x01\n\x07\x44isease\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x19\n\x05\x63odes\x18\x03 \x03(\x0b\x32\n.nuva.Code\x12\x13\n\x0bvalence_ids\x18\x04 \x03(\x05\x12.\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'Disease_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
37
+ _globals['_DISEASE']._serialized_start=69
38
+ _globals['_DISEASE']._serialized_end=248
39
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: InjectionMethod.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'InjectionMethod.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15InjectionMethod.proto\x12\x04nuva*\x81\x01\n\x0fInjectionMethod\x12\x1e\n\x1aUnspecifiedInjectionMethod\x10\x00\x12\x11\n\rIntramuscular\x10\x01\x12\x10\n\x0cSubcutaneous\x10\x02\x12\x08\n\x04Oral\x10\x03\x12\x0e\n\nIntranasal\x10\x04\x12\x0f\n\x0bIntradermal\x10\x05\x42!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'InjectionMethod_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
35
+ _globals['_INJECTIONMETHOD']._serialized_start=32
36
+ _globals['_INJECTIONMETHOD']._serialized_end=161
37
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,43 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: NuvaDatabase.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'NuvaDatabase.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+ from . import VersionInfo_pb2 as VersionInfo__pb2
27
+ from . import Vaccine_pb2 as Vaccine__pb2
28
+ from . import Disease_pb2 as Disease__pb2
29
+ from . import Valence_pb2 as Valence__pb2
30
+ from . import ValenceType_pb2 as ValenceType__pb2
31
+
32
+
33
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12NuvaDatabase.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x11VersionInfo.proto\x1a\rVaccine.proto\x1a\rDisease.proto\x1a\rValence.proto\x1a\x11ValenceType.proto\"\x99\x02\n\x0cNuvaDatabase\x12\"\n\x07version\x18\x01 \x01(\x0b\x32\x11.nuva.VersionInfo\x12\x30\n\x0cgenerated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06locale\x18\x03 \x01(\t\x12\x1f\n\x08vaccines\x18\x04 \x03(\x0b\x32\r.nuva.Vaccine\x12\x1f\n\x08\x64iseases\x18\x05 \x03(\x0b\x32\r.nuva.Disease\x12\x1f\n\x08valences\x18\x06 \x03(\x0b\x32\r.nuva.Valence\x12(\n\rvalence_types\x18\x07 \x03(\x0b\x32\x11.nuva.ValenceType\x12\x16\n\x0eschema_version\x18\x08 \x01(\rB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
34
+
35
+ _globals = globals()
36
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
37
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'NuvaDatabase_pb2', _globals)
38
+ if not _descriptor._USE_C_DESCRIPTORS:
39
+ _globals['DESCRIPTOR']._loaded_options = None
40
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
41
+ _globals['_NUVADATABASE']._serialized_start=145
42
+ _globals['_NUVADATABASE']._serialized_end=426
43
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,40 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: Vaccine.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'Vaccine.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+ from . import InjectionMethod_pb2 as InjectionMethod__pb2
27
+ from . import Code_pb2 as Code__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rVaccine.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15InjectionMethod.proto\x1a\nCode.proto\"\x85\x03\n\x07Vaccine\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x11injection_methods\x18\x04 \x03(\x0e\x32\x15.nuva.InjectionMethod\x12\x19\n\x05\x63odes\x18\x05 \x03(\x0b\x32\n.nuva.Code\x12\x13\n\x0bvalence_ids\x18\x06 \x03(\x05\x12\x13\n\x0bother_names\x18\x07 \x03(\t\x12\x0f\n\x07generic\x18\x08 \x01(\x08\x12\x1f\n\x12generic_vaccine_id\x18\t \x01(\x05H\x01\x88\x01\x01\x12\x16\n\x0eimmunoglobulin\x18\n \x01(\x08\x12.\n\ncreated_at\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0e\n\x0c_descriptionB\x15\n\x13_generic_vaccine_idB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
31
+
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'Vaccine_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ _globals['DESCRIPTOR']._loaded_options = None
37
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
38
+ _globals['_VACCINE']._serialized_start=92
39
+ _globals['_VACCINE']._serialized_end=481
40
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,38 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: ValenceType.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'ValenceType.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+
27
+
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11ValenceType.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x0bValenceType\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x16\n\tparent_id\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0c\n\n_parent_idB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
29
+
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ValenceType_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ _globals['DESCRIPTOR']._loaded_options = None
35
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
36
+ _globals['_VALENCETYPE']._serialized_start=61
37
+ _globals['_VALENCETYPE']._serialized_end=234
38
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,39 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: Valence.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'Valence.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+ from . import Code_pb2 as Code__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rValence.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\nCode.proto\"\x8c\x02\n\x07Valence\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x16\n\tparent_id\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x14\n\x0c\x61\x62\x62reviation\x18\x04 \x01(\t\x12\x1c\n\x0fvalence_type_id\x18\x05 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\x05\x63odes\x18\x06 \x03(\x0b\x32\n.nuva.Code\x12.\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0c\n\n_parent_idB\x12\n\x10_valence_type_idB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'Valence_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
37
+ _globals['_VALENCE']._serialized_start=69
38
+ _globals['_VALENCE']._serialized_end=337
39
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: VersionInfo.proto
5
+ # Protobuf Python Version: 5.28.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 2,
17
+ '',
18
+ 'VersionInfo.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11VersionInfo.proto\x12\x04nuva\":\n\x0bVersionInfo\x12\r\n\x05major\x18\x01 \x01(\r\x12\r\n\x05minor\x18\x02 \x01(\r\x12\r\n\x05patch\x18\x03 \x01(\rB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'VersionInfo_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n\017com.syadem.nuvaP\001\252\002\013Syadem.Nuva'
35
+ _globals['_VERSIONINFO']._serialized_start=27
36
+ _globals['_VERSIONINFO']._serialized_end=85
37
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1 @@
1
+ # Protobuf generated files