followthemoney 3.8.2__py3-none-any.whl → 3.8.4__py3-none-any.whl
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.
Potentially problematic release.
This version of followthemoney might be problematic. Click here for more details.
- followthemoney/__init__.py +1 -1
- followthemoney/model.py +3 -1
- followthemoney/schema/Thing.yaml +9 -0
- followthemoney/schema.py +1 -0
- followthemoney/types/country.py +3 -3
- followthemoney/types/language.py +1 -0
- followthemoney/types/topic.py +2 -1
- {followthemoney-3.8.2.dist-info → followthemoney-3.8.4.dist-info}/METADATA +2 -3
- {followthemoney-3.8.2.dist-info → followthemoney-3.8.4.dist-info}/RECORD +12 -12
- {followthemoney-3.8.2.dist-info → followthemoney-3.8.4.dist-info}/WHEEL +0 -0
- {followthemoney-3.8.2.dist-info → followthemoney-3.8.4.dist-info}/entry_points.txt +0 -0
- {followthemoney-3.8.2.dist-info → followthemoney-3.8.4.dist-info}/licenses/LICENSE +0 -0
followthemoney/__init__.py
CHANGED
followthemoney/model.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import yaml
|
|
3
|
+
from functools import lru_cache
|
|
3
4
|
from typing import Any, Dict, Generator, Iterator, Optional, Set, TypedDict, Union
|
|
4
5
|
|
|
5
6
|
from followthemoney.types import registry
|
|
@@ -32,7 +33,7 @@ class Model(object):
|
|
|
32
33
|
#: All properties defined in the model.
|
|
33
34
|
self.properties: Set[Property] = set()
|
|
34
35
|
self.qnames: Dict[str, Property] = {}
|
|
35
|
-
for
|
|
36
|
+
for path, _, filenames in os.walk(self.path):
|
|
36
37
|
for filename in filenames:
|
|
37
38
|
self._load(os.path.join(path, filename))
|
|
38
39
|
self.generate()
|
|
@@ -101,6 +102,7 @@ class Model(object):
|
|
|
101
102
|
for entity in gen.map(record).values():
|
|
102
103
|
yield entity
|
|
103
104
|
|
|
105
|
+
@lru_cache(maxsize=None)
|
|
104
106
|
def common_schema(
|
|
105
107
|
self, left: Union[str, Schema], right: Union[str, Schema]
|
|
106
108
|
) -> Schema:
|
followthemoney/schema/Thing.yaml
CHANGED
|
@@ -76,6 +76,15 @@ Thing:
|
|
|
76
76
|
range: Address
|
|
77
77
|
program: # Used by sanctions
|
|
78
78
|
label: Program
|
|
79
|
+
description: Regulatory program or sanctions list on which an entity is listed.
|
|
80
|
+
programId:
|
|
81
|
+
# This is a unique identifier for the program issued by OpenSanctions, but
|
|
82
|
+
# could also be used for authority-issued IDs in other usage scenarios.
|
|
83
|
+
label: "Program ID"
|
|
84
|
+
type: identifier
|
|
85
|
+
maxLength: 64
|
|
86
|
+
hidden: true
|
|
87
|
+
matchable: false
|
|
79
88
|
notes:
|
|
80
89
|
label: Notes
|
|
81
90
|
type: text
|
followthemoney/schema.py
CHANGED
|
@@ -391,6 +391,7 @@ class Schema:
|
|
|
391
391
|
self._matchable_schemata.add(schema)
|
|
392
392
|
return self._matchable_schemata
|
|
393
393
|
|
|
394
|
+
@lru_cache(maxsize=None)
|
|
394
395
|
def can_match(self, other: "Schema") -> bool:
|
|
395
396
|
"""Check if an schema can match with another schema."""
|
|
396
397
|
return other in self.matchable_schemata
|
followthemoney/types/country.py
CHANGED
|
@@ -45,9 +45,9 @@ class CountryType(EnumType):
|
|
|
45
45
|
return ftm_country
|
|
46
46
|
code = countrynames.to_code(text, fuzzy=fuzzy)
|
|
47
47
|
if code is not None:
|
|
48
|
-
|
|
49
|
-
if
|
|
50
|
-
return
|
|
48
|
+
territory = get_territory(code)
|
|
49
|
+
if territory is not None:
|
|
50
|
+
return territory.ftm_country
|
|
51
51
|
return None
|
|
52
52
|
|
|
53
53
|
def country_hint(self, value: str) -> str:
|
followthemoney/types/language.py
CHANGED
followthemoney/types/topic.py
CHANGED
|
@@ -36,6 +36,8 @@ class TopicType(EnumType):
|
|
|
36
36
|
"crime.traffick": _("Trafficking"),
|
|
37
37
|
"crime.traffick.drug": _("Drug trafficking"),
|
|
38
38
|
"crime.traffick.human": _("Human trafficking"),
|
|
39
|
+
"forced.labor": _("Forced labor"),
|
|
40
|
+
"asset.frozen": _("Frozen asset"),
|
|
39
41
|
"wanted": _("Wanted"),
|
|
40
42
|
"corp.offshore": _("Offshore"),
|
|
41
43
|
"corp.shell": _("Shell company"),
|
|
@@ -77,7 +79,6 @@ class TopicType(EnumType):
|
|
|
77
79
|
"pol.union": _("Union"),
|
|
78
80
|
"rel": _("Religion"),
|
|
79
81
|
"mil": _("Military"),
|
|
80
|
-
"asset.frozen": _("Frozen asset"),
|
|
81
82
|
"sanction": _("Sanctioned entity"),
|
|
82
83
|
"sanction.linked": _("Sanction-linked entity"),
|
|
83
84
|
"sanction.counter": _("Counter-sanctioned entity"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: followthemoney
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.4
|
|
4
4
|
Summary: A data model for anti corruption data modeling and analysis.
|
|
5
5
|
Project-URL: Documentation, https://followthemoney.tech/
|
|
6
6
|
Project-URL: Repository, https://github.com/alephdata/followthemoney.git
|
|
@@ -46,12 +46,11 @@ Requires-Dist: openpyxl<4.0.0,>=3.0.5
|
|
|
46
46
|
Requires-Dist: orjson<4.0,>=3.7
|
|
47
47
|
Requires-Dist: phonenumbers<10.0.0,>=8.12.22
|
|
48
48
|
Requires-Dist: prefixdate<1.0.0,>=0.4.0
|
|
49
|
-
Requires-Dist: python-stdnum<2.0.0,>=1.16
|
|
50
49
|
Requires-Dist: pytz>=2021.1
|
|
51
50
|
Requires-Dist: pyyaml<7.0.0,>=5.0.0
|
|
52
51
|
Requires-Dist: rdflib<7.2.0,>=6.2.0
|
|
53
52
|
Requires-Dist: requests<3.0.0,>=2.21.0
|
|
54
|
-
Requires-Dist: rigour<1.0.0,>=0.
|
|
53
|
+
Requires-Dist: rigour<1.0.0,>=0.11.1
|
|
55
54
|
Requires-Dist: sqlalchemy2-stubs
|
|
56
55
|
Requires-Dist: sqlalchemy<3.0.0,>=1.4.49
|
|
57
56
|
Requires-Dist: types-pyyaml
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
followthemoney/__init__.py,sha256=
|
|
1
|
+
followthemoney/__init__.py,sha256=7oKn-HF4NWWl-ZAFITBRDLydUFGKVOFnmSZH51hf9ak,360
|
|
2
2
|
followthemoney/compare.py,sha256=1GFkCfTzA8QR0CH90kvySR8hvl9hQRUerW5Xw2Ivmpg,5134
|
|
3
3
|
followthemoney/exc.py,sha256=ynZs_UnTVxHR-iBfat_CpVLraYzVX5yLtVf5Ti14hl4,734
|
|
4
4
|
followthemoney/graph.py,sha256=VNDKrUBkz_-DmKsr5v-Xm8VfxzabnTwkU_MFk92_TjA,10848
|
|
5
5
|
followthemoney/helpers.py,sha256=Btb6BlHg_c-qCXZo-NP_LURKG-qu-QD3Fj1ev_c7Xic,7956
|
|
6
6
|
followthemoney/messages.py,sha256=zUEa9CFecU8nRafIzhN6TKCh1kEihiIyIS1qr8PxY4g,806
|
|
7
|
-
followthemoney/model.py,sha256=
|
|
7
|
+
followthemoney/model.py,sha256=FBY6iSbfvsxdjwFlwhs234IbYtl_MwEeTTmoxIFBxC0,6485
|
|
8
8
|
followthemoney/namespace.py,sha256=qYplxKn5OO3zDMf3NItKwTwDsJOnski5JbeyhssqhR8,4434
|
|
9
9
|
followthemoney/offshore.py,sha256=Pf0tx-7GyhIZRueshDRqPNlxkHfGstmW5yNDID5Mnws,1060
|
|
10
10
|
followthemoney/ontology.py,sha256=7PEoUKISNpkRvVhuLeE3IE9ZiNtdR8mn9_kzZ9yF9l0,2986
|
|
@@ -12,7 +12,7 @@ followthemoney/property.py,sha256=zi9ss1v0e8Wmv-FuLtZd2aod5iTLfBekBxuOTgIOUMU,77
|
|
|
12
12
|
followthemoney/proxy.py,sha256=M7RIPF0k-P3v7GYKYhRVVaO1cnUf5FArJepE-2c0KMQ,20033
|
|
13
13
|
followthemoney/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
followthemoney/rdf.py,sha256=9wPs-tqN9QILuvrmH_YheNaFQctyIQqoIEqcS465QHs,343
|
|
15
|
-
followthemoney/schema.py,sha256=
|
|
15
|
+
followthemoney/schema.py,sha256=Yqv11zhZXMOq1MjKQP44Ie8vIurDrSr5qlqRJEueLK4,18126
|
|
16
16
|
followthemoney/util.py,sha256=6VR-T5-vT-8xpE6__Skrqe_MpE6y6csvNKERTJlsITA,4527
|
|
17
17
|
followthemoney/cli/__init__.py,sha256=Fl05wMr5-FlOSMRpmu1HJSNfPRpy8u9as5IRbGXdo4U,421
|
|
18
18
|
followthemoney/cli/aggregate.py,sha256=Gwfi5Bt1LCwqbpsCu4P1Cr-QJtCWhbaqgGEzfwJUUL4,2142
|
|
@@ -96,7 +96,7 @@ followthemoney/schema/Similar.yaml,sha256=gD8rZEaPQWzU-rEfsKdn62uEucF3KxYBcPMoSd
|
|
|
96
96
|
followthemoney/schema/Succession.yaml,sha256=RMJQqZ4Fv88N1RvWTAgjYg9BB5cELSj5CCAjM681Fpg,749
|
|
97
97
|
followthemoney/schema/Table.yaml,sha256=GcsIAgSO9t2tvObA9zU2HhxlSqTe9CePmUnagu1Z0vI,641
|
|
98
98
|
followthemoney/schema/TaxRoll.yaml,sha256=ugMzaaS7uyq2OLD50eGLcfvd6Cg0cSt65-T9GVqpRSA,746
|
|
99
|
-
followthemoney/schema/Thing.yaml,sha256=
|
|
99
|
+
followthemoney/schema/Thing.yaml,sha256=IWVpyhUGuvR6x5eyObPjJ0eEIyYHuw1FLWGLe6aaNas,2829
|
|
100
100
|
followthemoney/schema/Trip.yaml,sha256=nLQD_ApmVJ8D56Czl7K700hhNZjzFV9FOQ3NBSQDLiM,771
|
|
101
101
|
followthemoney/schema/UnknownLink.yaml,sha256=lneS_HZNgeLyJxwzWnLx0ZoyY3MXt99I_K2X_o9z5g8,682
|
|
102
102
|
followthemoney/schema/UserAccount.yaml,sha256=V1JWwwcggCO4G9ByJY9zlQ0uOVp8HQK2mRXwqaGJnBM,763
|
|
@@ -132,7 +132,7 @@ followthemoney/types/__init__.py,sha256=X9XeM6JktzirAw5gGkyDKGM70NuiJ9Tbjoq0IwVc
|
|
|
132
132
|
followthemoney/types/address.py,sha256=NnJli6jIs5DfePL4m3dA3Xwv7GA8sdl1J6Mtm-QLeOY,2068
|
|
133
133
|
followthemoney/types/checksum.py,sha256=OqjCsBPyMIV3_Y20kTTvjkyayy32pBtaI5KKwYQb6lY,937
|
|
134
134
|
followthemoney/types/common.py,sha256=Yk-7LZ6uDgFzKXUZxQ_j5miN2ZMnlBOziU0iFC7FE9I,10202
|
|
135
|
-
followthemoney/types/country.py,sha256=
|
|
135
|
+
followthemoney/types/country.py,sha256=aYSvTeI37JFzV3ATl-_-r6Vnc4ye8Nc0rVwaXgqbOaU,1863
|
|
136
136
|
followthemoney/types/date.py,sha256=4lZCd0aws-T3HE2BYkb-a-t8iQDr0nqFSAEBoUKiTlM,2683
|
|
137
137
|
followthemoney/types/email.py,sha256=zAnMHwC_FZh7IagpDRhGZf-GfQR6uW8d-lZP4UCdGcM,2745
|
|
138
138
|
followthemoney/types/entity.py,sha256=FA8xXNCkiM7HlF6k5lxTlb_B_LKlUwaoOMaVqAdjgYc,2477
|
|
@@ -141,17 +141,17 @@ followthemoney/types/iban.py,sha256=QYD49erJCB6I2nbtTagRMvpa4RyjezfB4Fpat2QLwAc,
|
|
|
141
141
|
followthemoney/types/identifier.py,sha256=Gk4h75_KyjkdtomrK9Ldsh9rD7-bsenFryevJFwqlX0,2036
|
|
142
142
|
followthemoney/types/ip.py,sha256=BxGARP9JWEWvyRnr7A7xUNwmTxyFd9kwXSZrKR0TK2Q,1412
|
|
143
143
|
followthemoney/types/json.py,sha256=Hefwns1-ziJf310MWvdfX5ICkOgj9cnnMJuqq1e6qKY,1676
|
|
144
|
-
followthemoney/types/language.py,sha256=
|
|
144
|
+
followthemoney/types/language.py,sha256=9w4jgJN4vs5SKPyBIXLcSUo0nupH4F2LukiF4KbPxxY,2864
|
|
145
145
|
followthemoney/types/mimetype.py,sha256=EZ5hIdn-wosfLc-GjXDaOzevxaSXPbSPHDUJmPT1h0I,1355
|
|
146
146
|
followthemoney/types/name.py,sha256=_Vu-MPYbgdN55gNBT2qHh-RDgbLQgT2l_kftnqJIEdw,2240
|
|
147
147
|
followthemoney/types/number.py,sha256=9l5v3hcAoJ4V6jaBS_-Kc1gtdJlQrY9L98ElC5e_PLQ,943
|
|
148
148
|
followthemoney/types/phone.py,sha256=2YFbPBtMepvCWTdcxXq3Fq4AU8B4QYk1FARBpsH8xjs,4040
|
|
149
149
|
followthemoney/types/registry.py,sha256=hvQ1oIWz_4PpyUnKA5azbaZCulNb5LCIPyC-AQYVVyw,1936
|
|
150
150
|
followthemoney/types/string.py,sha256=grDn1OgKWxIzVxGEdp0HjVKIqtQ9W4SW2ty4quv3Pcs,1202
|
|
151
|
-
followthemoney/types/topic.py,sha256=
|
|
151
|
+
followthemoney/types/topic.py,sha256=FqV_4YDpmQxZO9m05l3c-nDyDqsZONqBG5aaf5aCkvA,3797
|
|
152
152
|
followthemoney/types/url.py,sha256=r7Pd6Yfn--amwMi_nHoTLMwm5SH8h50SMgQaa2G4PJ0,1492
|
|
153
|
-
followthemoney-3.8.
|
|
154
|
-
followthemoney-3.8.
|
|
155
|
-
followthemoney-3.8.
|
|
156
|
-
followthemoney-3.8.
|
|
157
|
-
followthemoney-3.8.
|
|
153
|
+
followthemoney-3.8.4.dist-info/METADATA,sha256=hO1oyvwXzk7pDe_Ex8Y-_fydsD8xVb18Iw9Gue6PgM0,6065
|
|
154
|
+
followthemoney-3.8.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
155
|
+
followthemoney-3.8.4.dist-info/entry_points.txt,sha256=xvTXjAz0CiZplq4V3iQXlmBexaJyW3zNucIvcDP6L_c,593
|
|
156
|
+
followthemoney-3.8.4.dist-info/licenses/LICENSE,sha256=3tfmmk9RtT1eh67a-NDRwcmOLzztbCtqlHW6O1U92ZA,1098
|
|
157
|
+
followthemoney-3.8.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|