https://github.com/smkent/s3-presigned-url-upload
Presigned URL s3 upload test project
https://github.com/smkent/s3-presigned-url-upload
Last synced: about 2 months ago
JSON representation
Presigned URL s3 upload test project
- Host: GitHub
- URL: https://github.com/smkent/s3-presigned-url-upload
- Owner: smkent
- License: gpl-3.0
- Created: 2023-11-18T22:12:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-18T23:19:40.000Z (over 1 year ago)
- Last Synced: 2025-01-28T14:15:09.698Z (4 months ago)
- Language: Python
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# s3-presigned-url-upload: Presigned URL s3 upload test project
[][gh-actions]
[][codecov]
[][repo]This is a utility project to test presigned URLs with an S3 bucket, particularly
for testing object upload using a presigned POST request URL and parameters.Access keys, secret keys, and the bucket base URL are reused from `s3cmd`'s
configuration file, `~/.s3cfg`.## Invocation
### Usage with Poetry (recommended)
```console
poetry install
poetry run s3-presigned-url-upload
```### Usage with pip
```console
pip install boto3 requests
python s3_presigned_url_upload/main.py
```## Usage
To generate a presigned POST request upload URL and parameters:
```console
poetry run s3-presigned-url-upload upload -b my-bucket -f dest-object-name.txt
```To generate and execute a presigned POST request upload URL and parameters:
```console
poetry run s3-presigned-url-upload upload -b my-bucket -f dest-object-name.txt -l local-file-to-upload.txt
```## Development
### [Poetry][poetry] installation
Via [`pipx`][pipx]:
```console
pip install pipx
pipx install poetry
pipx inject poetry poetry-dynamic-versioning poetry-pre-commit-plugin
```Via `pip`:
```console
pip install poetry
poetry self add poetry-dynamic-versioning poetry-pre-commit-plugin
```### Development tasks
* Setup: `poetry install`
* Run static checks: `poetry run poe lint` or
`poetry run pre-commit run --all-files`
* Run static checks and tests: `poetry run poe test`---
Created from [smkent/cookie-python][cookie-python] using
[cookiecutter][cookiecutter][codecov]: https://codecov.io/gh/smkent/s3-presigned-url-upload
[cookie-python]: https://github.com/smkent/cookie-python
[cookiecutter]: https://github.com/cookiecutter/cookiecutter
[gh-actions]: https://github.com/smkent/s3-presigned-url-upload/actions?query=branch%3Amain
[pipx]: https://pypa.github.io/pipx/
[poetry]: https://python-poetry.org/docs/#installation
[repo]: https://github.com/smkent/s3-presigned-url-upload