s3func 0.1.0__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,115 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+ junit/
50
+ junit.xml
51
+ test.db
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+
61
+ # Flask stuff:
62
+ instance/
63
+ .webassets-cache
64
+
65
+ # Scrapy stuff:
66
+ .scrapy
67
+
68
+ # Sphinx documentation
69
+ docs/_build/
70
+
71
+ # PyBuilder
72
+ target/
73
+
74
+ # Jupyter Notebook
75
+ .ipynb_checkpoints
76
+
77
+ # pyenv
78
+ .python-version
79
+
80
+ # celery beat schedule file
81
+ celerybeat-schedule
82
+
83
+ # SageMath parsed files
84
+ *.sage.py
85
+
86
+ # dotenv
87
+ .env
88
+
89
+ # virtualenv
90
+ .venv
91
+ venv/
92
+ ENV/
93
+
94
+ # Spyder project settings
95
+ .spyderproject
96
+ .spyproject
97
+
98
+ # Rope project settings
99
+ .ropeproject
100
+
101
+ # mkdocs documentation
102
+ /site
103
+
104
+ # mypy
105
+ .mypy_cache/
106
+
107
+ # .vscode
108
+ .vscode/
109
+
110
+ # OS files
111
+ .DS_Store
112
+
113
+ # S3 config file for tests
114
+ s3func/tests/s3_config.toml
115
+
s3func-0.1.0/LICENSE ADDED
@@ -0,0 +1,16 @@
1
+ Apache Software License 2.0
2
+
3
+ Copyright (c) 2024, Mike Kittridge
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+
s3func-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.3
2
+ Name: s3func
3
+ Version: 0.1.0
4
+ Summary: Simple functions for working with S3
5
+ Project-URL: Documentation, https://mullenkamp.github.io/s3func/
6
+ Project-URL: Source, https://github.com/mullenkamp/s3func
7
+ Author-email: s3func <mullenkamp1@gmail.com>
8
+ License-File: LICENSE
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Requires-Python: >=3.9
11
+ Requires-Dist: boto3
12
+ Requires-Dist: pydantic
13
+ Requires-Dist: urllib3
14
+ Description-Content-Type: text/markdown
15
+
16
+ # s3func
17
+
18
+ <p align="center">
19
+ <em>Simple functions for working with S3</em>
20
+ </p>
21
+
22
+ [![build](https://github.com/mullenkamp/s3func/workflows/Build/badge.svg)](https://github.com/mullenkamp/s3func/actions)
23
+ [![codecov](https://codecov.io/gh/mullenkamp/s3func/branch/master/graph/badge.svg)](https://codecov.io/gh/mullenkamp/s3func)
24
+ [![PyPI version](https://badge.fury.io/py/s3func.svg)](https://badge.fury.io/py/s3func)
25
+
26
+ ---
27
+
28
+ **Documentation**: <a href="https://mullenkamp.github.io/s3func/" target="_blank">https://mullenkamp.github.io/s3func/</a>
29
+
30
+ **Source Code**: <a href="https://github.com/mullenkamp/s3func" target="_blank">https://github.com/mullenkamp/s3func</a>
31
+
32
+ ---
33
+
34
+ ## Development
35
+
36
+ ### Setup environment
37
+
38
+ We use [Hatch](https://hatch.pypa.io/latest/install/) to manage the development environment and production build. Ensure it's installed on your system.
39
+
40
+ ### Run unit tests
41
+
42
+ You can run all the tests with:
43
+
44
+ ```bash
45
+ hatch run test
46
+ ```
47
+
48
+ ### Format the code
49
+
50
+ Execute the following command to apply linting and check typing:
51
+
52
+ ```bash
53
+ hatch run lint
54
+ ```
55
+
56
+ ### Publish a new version
57
+
58
+ You can bump the version, create a commit and associated tag with one command:
59
+
60
+ ```bash
61
+ hatch version patch
62
+ ```
63
+
64
+ ```bash
65
+ hatch version minor
66
+ ```
67
+
68
+ ```bash
69
+ hatch version major
70
+ ```
71
+
72
+ Your default Git text editor will open so you can add information about the release.
73
+
74
+ When you push the tag on GitHub, the workflow will automatically publish it on PyPi and a GitHub release will be created as draft.
75
+
76
+ ## Serve the documentation
77
+
78
+ You can serve the Mkdocs documentation with:
79
+
80
+ ```bash
81
+ hatch run docs-serve
82
+ ```
83
+
84
+ It'll automatically watch for changes in your code.
85
+
86
+ ## License
87
+
88
+ This project is licensed under the terms of the Apache Software License 2.0.
s3func-0.1.0/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # s3func
2
+
3
+ <p align="center">
4
+ <em>Simple functions for working with S3</em>
5
+ </p>
6
+
7
+ [![build](https://github.com/mullenkamp/s3func/workflows/Build/badge.svg)](https://github.com/mullenkamp/s3func/actions)
8
+ [![codecov](https://codecov.io/gh/mullenkamp/s3func/branch/master/graph/badge.svg)](https://codecov.io/gh/mullenkamp/s3func)
9
+ [![PyPI version](https://badge.fury.io/py/s3func.svg)](https://badge.fury.io/py/s3func)
10
+
11
+ ---
12
+
13
+ **Documentation**: <a href="https://mullenkamp.github.io/s3func/" target="_blank">https://mullenkamp.github.io/s3func/</a>
14
+
15
+ **Source Code**: <a href="https://github.com/mullenkamp/s3func" target="_blank">https://github.com/mullenkamp/s3func</a>
16
+
17
+ ---
18
+
19
+ ## Development
20
+
21
+ ### Setup environment
22
+
23
+ We use [Hatch](https://hatch.pypa.io/latest/install/) to manage the development environment and production build. Ensure it's installed on your system.
24
+
25
+ ### Run unit tests
26
+
27
+ You can run all the tests with:
28
+
29
+ ```bash
30
+ hatch run test
31
+ ```
32
+
33
+ ### Format the code
34
+
35
+ Execute the following command to apply linting and check typing:
36
+
37
+ ```bash
38
+ hatch run lint
39
+ ```
40
+
41
+ ### Publish a new version
42
+
43
+ You can bump the version, create a commit and associated tag with one command:
44
+
45
+ ```bash
46
+ hatch version patch
47
+ ```
48
+
49
+ ```bash
50
+ hatch version minor
51
+ ```
52
+
53
+ ```bash
54
+ hatch version major
55
+ ```
56
+
57
+ Your default Git text editor will open so you can add information about the release.
58
+
59
+ When you push the tag on GitHub, the workflow will automatically publish it on PyPi and a GitHub release will be created as draft.
60
+
61
+ ## Serve the documentation
62
+
63
+ You can serve the Mkdocs documentation with:
64
+
65
+ ```bash
66
+ hatch run docs-serve
67
+ ```
68
+
69
+ It'll automatically watch for changes in your code.
70
+
71
+ ## License
72
+
73
+ This project is licensed under the terms of the Apache Software License 2.0.
@@ -0,0 +1,183 @@
1
+ [project]
2
+ name = "s3func"
3
+ authors = [
4
+ { name = "s3func", email = "mullenkamp1@gmail.com" }
5
+ ]
6
+ description = "Simple functions for working with S3"
7
+ readme = "README.md"
8
+ dynamic = ["version"]
9
+ classifiers = [
10
+ "Programming Language :: Python :: 3 :: Only",
11
+ ]
12
+ requires-python = ">=3.9"
13
+ dependencies = ['boto3',
14
+ 'urllib3',
15
+ 'pydantic'
16
+ ]
17
+
18
+ # [tool.ruff]
19
+ # target-version = "py310"
20
+ # extend-select = ["I", "TRY", "UP"]
21
+
22
+ # [tool.pytest.ini_options]
23
+ # addopts = "--cov=s3func/ --cov-report=term-missing"
24
+
25
+
26
+ [tool.hatch]
27
+
28
+ [tool.hatch.version]
29
+ path = "s3func/__init__.py"
30
+
31
+ [tool.hatch.metadata]
32
+ allow-direct-references = true
33
+
34
+ # [tool.hatch.version]
35
+ # source = "regex_commit"
36
+ # commit_extra_args = ["-e"]
37
+ # path = "s3func/__init__.py"
38
+
39
+ [tool.hatch.envs.default]
40
+ python = "3.10"
41
+ dependencies = [
42
+ "spyder-kernels==2.4",
43
+ "black",
44
+ "mypy",
45
+ "ruff",
46
+ "pytest",
47
+ "pytest-cov",
48
+ "mkdocs-material",
49
+ "mkdocstrings[python]",
50
+
51
+ ]
52
+
53
+ [[tool.hatch.envs.all.matrix]]
54
+ python = ['3.8', '3.9', '3.10']
55
+
56
+ [tool.hatch.envs.lint]
57
+ detached = true
58
+ dependencies = [
59
+ "black>=23.1.0",
60
+ "mypy>=1.0.0",
61
+ "ruff>=0.0.243",
62
+ ]
63
+ [tool.hatch.envs.lint.scripts]
64
+ typing = "mypy --install-types --non-interactive {args:src/s3func tests}"
65
+ style = [
66
+ "ruff {args:.}",
67
+ "black --check --diff {args:.}",
68
+ ]
69
+ fmt = [
70
+ "black {args:.}",
71
+ "ruff --fix {args:.}",
72
+ "style",
73
+ ]
74
+ all = [
75
+ "style",
76
+ "typing",
77
+ ]
78
+
79
+ [tool.hatch.envs.default.scripts]
80
+ test = "pytest {args:tests}"
81
+ test-cov = "coverage run -m pytest {args:tests}"
82
+ cov-report = [
83
+ "- coverage combine",
84
+ "coverage report",
85
+ ]
86
+ cov = [
87
+ "test-cov",
88
+ "cov-report",
89
+ ]
90
+ docs-serve = "mkdocs serve"
91
+ docs-build = "mkdocs build"
92
+
93
+ [tool.black]
94
+ target-version = ["py37"]
95
+ line-length = 120
96
+ skip-string-normalization = true
97
+
98
+ [tool.ruff]
99
+ target-version = "py310"
100
+ line-length = 120
101
+ select = [
102
+ "A",
103
+ "ARG",
104
+ "B",
105
+ "C",
106
+ "DTZ",
107
+ "E",
108
+ "EM",
109
+ "F",
110
+ "FBT",
111
+ "I",
112
+ "ICN",
113
+ "ISC",
114
+ "N",
115
+ "PLC",
116
+ "PLE",
117
+ "PLR",
118
+ "PLW",
119
+ "Q",
120
+ "RUF",
121
+ "S",
122
+ "T",
123
+ "TID",
124
+ "UP",
125
+ "W",
126
+ "YTT",
127
+ ]
128
+ ignore = [
129
+ # Allow non-abstract empty methods in abstract base classes
130
+ "B027",
131
+ # Allow boolean positional values in function calls, like `dict.get(... True)`
132
+ "FBT003",
133
+ # Ignore checks for possible passwords
134
+ "S105", "S106", "S107",
135
+ # Ignore complexity
136
+ "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
137
+ ]
138
+ unfixable = [
139
+ # Don't touch unused imports
140
+ "F401",
141
+ ]
142
+
143
+ [tool.ruff.isort]
144
+ known-first-party = ["s3func"]
145
+
146
+ [tool.ruff.flake8-tidy-imports]
147
+ ban-relative-imports = "all"
148
+
149
+ [tool.ruff.per-file-ignores]
150
+ # Tests can use magic values, assertions, and relative imports
151
+ "tests/**/*" = ["PLR2004", "S101", "TID252"]
152
+
153
+ [tool.coverage.run]
154
+ source_pkgs = ["s3func", "tests"]
155
+ branch = true
156
+ parallel = true
157
+ omit = [
158
+ "src/s3func/__about__.py",
159
+ ]
160
+
161
+ [tool.coverage.paths]
162
+ s3func = ["src/s3func", "*/s3func/src/s3func"]
163
+ tests = ["tests", "*/s3func/tests"]
164
+
165
+ [tool.coverage.report]
166
+ exclude_lines = [
167
+ "no cov",
168
+ "if __name__ == .__main__.:",
169
+ "if TYPE_CHECKING:",
170
+ ]
171
+
172
+ [build-system]
173
+ requires = ["hatchling", "hatch-regex-commit"]
174
+ build-backend = "hatchling.build"
175
+
176
+ [project.urls]
177
+ Documentation = "https://mullenkamp.github.io/s3func/"
178
+ Source = "https://github.com/mullenkamp/s3func"
179
+
180
+ [tool.hatch.build.targets.sdist]
181
+ include = [
182
+ "/s3func",
183
+ ]
@@ -0,0 +1,5 @@
1
+ """Simple functions for working with S3"""
2
+ from s3func.main import s3_client, url_session, url_to_stream, base_url_to_stream, get_object, get_object_combo, put_object, list_objects, list_object_versions, delete_objects, put_object_legal_hold, put_object_lock_configuration, get_object_legal_hold
3
+ from s3func import utils
4
+
5
+ __version__ = '0.1.0'