Revert feat: remove unmaintened modules (#443)

This commit is contained in:
Maksym Yankin
2025-02-03 10:20:18 +02:00
parent 1dd8c393ef
commit 2428189308
9 changed files with 277 additions and 3 deletions
+20
View File
@@ -0,0 +1,20 @@
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import re
class S3Uri:
_url_re = re.compile("^s3:///*([^/]*)/?(.*)", re.IGNORECASE | re.UNICODE)
def __init__(self, uri):
match = self._url_re.match(uri)
if not match:
raise ValueError("%s: is not a valid S3 URI" % (uri,))
self._bucket, self._item = match.groups()
def bucket(self):
return self._bucket
def item(self):
return self._item