archivefs 0.2.0__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.
archivefs/__init__.py ADDED
@@ -0,0 +1,61 @@
1
+ """archivefs — read-only fsspec filesystems for scientific data archives.
2
+
3
+ Address data by accession or DOI and pull it through the fsspec ecosystem
4
+ (including DVC's ``import-url``)::
5
+
6
+ ega://EGAD00001006673 # dataset -> directory
7
+ ega://EGAD00001006673/EGAF00004908765 # one file
8
+ zenodo://<record_id>/<filename> # or zenodo://10.5281/zenodo.<id>
9
+ mendeley://10.17632/<id>[/<version>] # Mendeley Data (anonymous; experimental)
10
+ geo://<GSE_accession> # supplementary/processed files
11
+ dbgap://<phs_id>/<SRR_accession> # deferred, not implemented
12
+
13
+ Importing this package is *not* required to use the protocols — fsspec finds them
14
+ through entry points — but it does re-register them with better error messages,
15
+ so it is cheap and harmless to do.
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ from archivefs.errors import (
21
+ ArchiveFSError,
22
+ ArchiveNotFoundError,
23
+ AuthenticationError,
24
+ CredentialsNotFoundError,
25
+ ManifestError,
26
+ MissingExtraError,
27
+ MissingToolError,
28
+ NotSupportedError,
29
+ UnsafeArchiveMemberError,
30
+ VerificationError,
31
+ )
32
+ from archivefs.registry import PROTOCOLS, installed_backends, register_implementations
33
+
34
+ try: # pragma: no cover - trivial packaging glue
35
+ from archivefs._version import version as __version__
36
+ except ImportError: # pragma: no cover
37
+ try:
38
+ from importlib.metadata import PackageNotFoundError, version
39
+
40
+ __version__ = version("archivefs")
41
+ except (ImportError, PackageNotFoundError):
42
+ __version__ = "0.0.0+unknown"
43
+
44
+ register_implementations()
45
+
46
+ __all__ = [
47
+ "PROTOCOLS",
48
+ "ArchiveFSError",
49
+ "ArchiveNotFoundError",
50
+ "AuthenticationError",
51
+ "CredentialsNotFoundError",
52
+ "ManifestError",
53
+ "MissingExtraError",
54
+ "MissingToolError",
55
+ "NotSupportedError",
56
+ "UnsafeArchiveMemberError",
57
+ "VerificationError",
58
+ "__version__",
59
+ "installed_backends",
60
+ "register_implementations",
61
+ ]
File without changes