-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdigests.py
More file actions
31 lines (22 loc) · 717 Bytes
/
Copy pathdigests.py
File metadata and controls
31 lines (22 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Module contains commonly used SHA1 digests in the Linked Data Fragments
Data Store and helper functions"""
__author__ = "Jeremy Nelson"
import hashlib
import rdflib
def get_sha1_digest(value):
"""Function takes a unicode string and returns it's sha1 digest
Args:
value -- Unicode string
Returns:
sha1 of value
"""
return hashlib.sha1(value.encode()).hexdigest()
OWL = {
"http://www.w3.org/2002/07/owl#sameAs": "7bffe77e6f9af628763e215707119bc2dbc9b927"
}
RDF = {
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "3c197cb1f6842dc41aa48dc8b9032284bcf39a27"
}
RDFS = {
"http://www.w3.org/2000/01/rdf-schema#label": "9ac796fdb3c1f82ad26a447b600262114a19983b"
}