object-storage-client 0.0.3__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.
- object_storage_client-0.0.3/.cargo/config.toml +13 -0
- object_storage_client-0.0.3/.github/dependabot.yml +8 -0
- object_storage_client-0.0.3/.github/workflows/ci.yaml +212 -0
- object_storage_client-0.0.3/.github/workflows/dependabot-automerge.yml +72 -0
- object_storage_client-0.0.3/.gitignore +23 -0
- object_storage_client-0.0.3/.python-version +1 -0
- object_storage_client-0.0.3/Cargo.lock +2197 -0
- object_storage_client-0.0.3/Cargo.toml +52 -0
- object_storage_client-0.0.3/LICENSE +674 -0
- object_storage_client-0.0.3/PKG-INFO +179 -0
- object_storage_client-0.0.3/README.md +162 -0
- object_storage_client-0.0.3/dist/wheels-macos-latest-aarch64-py3.13)/object_storage_client-0.0.3-cp313-cp313-macosx_11_0_arm64.whl +0 -0
- object_storage_client-0.0.3/dist/wheels-macos-latest-aarch64-py3.14)/object_storage_client-0.0.3-cp314-cp314-macosx_11_0_arm64.whl +0 -0
- object_storage_client-0.0.3/dist/wheels-ubuntu-latest-x86_64-py3.13)/object_storage_client-0.0.3-cp313-cp313-manylinux_2_39_x86_64.whl +0 -0
- object_storage_client-0.0.3/dist/wheels-ubuntu-latest-x86_64-py3.14)/object_storage_client-0.0.3-cp314-cp314-manylinux_2_39_x86_64.whl +0 -0
- object_storage_client-0.0.3/pyproject.toml +30 -0
- object_storage_client-0.0.3/python/object_storage_client/__init__.py +3 -0
- object_storage_client-0.0.3/python/object_storage_client/_internal.pyi +18 -0
- object_storage_client-0.0.3/python/object_storage_client/py.typed +0 -0
- object_storage_client-0.0.3/src/client.rs +316 -0
- object_storage_client-0.0.3/src/lib.rs +5 -0
- object_storage_client-0.0.3/src/main.rs +120 -0
- object_storage_client-0.0.3/src/python.rs +145 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build]
|
|
2
|
+
|
|
3
|
+
[target.x86_64-unknown-linux-musl]
|
|
4
|
+
rustflags = ["-C", "target-cpu=x86-64-v3"]
|
|
5
|
+
|
|
6
|
+
[target.x86_64-unknown-linux-gnu]
|
|
7
|
+
rustflags = ["-C", "target-cpu=x86-64-v3"]
|
|
8
|
+
|
|
9
|
+
[target.aarch64-apple-darwin]
|
|
10
|
+
rustflags = ["-C", "target-cpu=apple-m3"]
|
|
11
|
+
|
|
12
|
+
[registries.bixority-codeberg]
|
|
13
|
+
index = "sparse+https://codeberg.org/api/packages/bixority/cargo/"
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
name: Build and push release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [ published ]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
REGISTRY: ghcr.io
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
name: Test
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
build: [ stable, beta, nightly ]
|
|
24
|
+
include:
|
|
25
|
+
- build: stable
|
|
26
|
+
os: ubuntu-latest
|
|
27
|
+
rust: stable
|
|
28
|
+
- build: beta
|
|
29
|
+
os: ubuntu-latest
|
|
30
|
+
rust: beta
|
|
31
|
+
- build: nightly
|
|
32
|
+
os: ubuntu-latest
|
|
33
|
+
rust: nightly
|
|
34
|
+
# - build: macos
|
|
35
|
+
# os: macos-latest
|
|
36
|
+
# rust: stable
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v6
|
|
39
|
+
- name: Install Rust (rustup)
|
|
40
|
+
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
|
|
41
|
+
shell: bash
|
|
42
|
+
- name: Run cargo test
|
|
43
|
+
run: cargo test
|
|
44
|
+
|
|
45
|
+
rustfmt:
|
|
46
|
+
name: Rustfmt
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v6
|
|
50
|
+
- name: Install Rust
|
|
51
|
+
run: rustup update stable && rustup default stable && rustup component add rustfmt clippy
|
|
52
|
+
- name: Rustfmt
|
|
53
|
+
run: cargo fmt -- --check
|
|
54
|
+
- name: Clippy
|
|
55
|
+
run: cargo clippy -- -D warnings -W clippy::pedantic
|
|
56
|
+
|
|
57
|
+
prepare:
|
|
58
|
+
needs:
|
|
59
|
+
- test
|
|
60
|
+
- rustfmt
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
permissions:
|
|
63
|
+
contents: read
|
|
64
|
+
steps:
|
|
65
|
+
- name: Get lowercase GitHub username
|
|
66
|
+
id: repository
|
|
67
|
+
uses: ASzc/change-string-case-action@v6
|
|
68
|
+
with:
|
|
69
|
+
string: ${{ github.repository }}
|
|
70
|
+
|
|
71
|
+
- name: Set outputs
|
|
72
|
+
id: set-outputs
|
|
73
|
+
run: |
|
|
74
|
+
echo 'image=ghcr.io/${{ steps.repository.outputs.lowercase }}' >> "${GITHUB_OUTPUT}"
|
|
75
|
+
# Only enable push on release event with action 'published'
|
|
76
|
+
echo 'push=${{ github.event_name == 'release' && github.event.action == 'published' }}' >> "${GITHUB_OUTPUT}"
|
|
77
|
+
|
|
78
|
+
- name: Get short SHA
|
|
79
|
+
id: short-sha
|
|
80
|
+
run: echo "short_sha=${GITHUB_SHA:0:12}" >> $GITHUB_ENV && echo "short_sha=${GITHUB_SHA:0:12}" >> $GITHUB_OUTPUT
|
|
81
|
+
|
|
82
|
+
- name: Extract tag name
|
|
83
|
+
id: extract_tag
|
|
84
|
+
if: github.event_name == 'release'
|
|
85
|
+
run: |
|
|
86
|
+
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
|
87
|
+
|
|
88
|
+
- name: Extract branch name
|
|
89
|
+
shell: bash
|
|
90
|
+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
|
91
|
+
id: extract_branch
|
|
92
|
+
|
|
93
|
+
- name: Docker meta
|
|
94
|
+
id: meta
|
|
95
|
+
uses: docker/metadata-action@v5
|
|
96
|
+
with:
|
|
97
|
+
images: |
|
|
98
|
+
${{ steps.set-outputs.outputs.image }}
|
|
99
|
+
tags: |
|
|
100
|
+
type=raw,value=${{ steps.extract_tag.outputs.tag }}
|
|
101
|
+
# type=raw,value=latest
|
|
102
|
+
|
|
103
|
+
outputs:
|
|
104
|
+
image: ${{ steps.set-outputs.outputs.image }}
|
|
105
|
+
push: ${{ steps.set-outputs.outputs.push }}
|
|
106
|
+
meta-version: ${{ steps.meta.outputs.version }}
|
|
107
|
+
meta-labels: ${{ steps.meta.outputs.labels }}
|
|
108
|
+
meta-json: ${{ steps.meta.outputs.json }}
|
|
109
|
+
tag: ${{ steps.extract_tag.outputs.tag }} # Save the extracted tag name to outputs
|
|
110
|
+
|
|
111
|
+
publish-crate:
|
|
112
|
+
name: Publish Crate to Codeberg
|
|
113
|
+
needs:
|
|
114
|
+
- prepare
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
117
|
+
|
|
118
|
+
steps:
|
|
119
|
+
- uses: actions/checkout@v6
|
|
120
|
+
|
|
121
|
+
- name: Set up Rust
|
|
122
|
+
uses: dtolnay/rust-toolchain@master
|
|
123
|
+
with:
|
|
124
|
+
toolchain: stable
|
|
125
|
+
|
|
126
|
+
- name: Publish crate to codeberg
|
|
127
|
+
run: cargo publish --registry bixority-codeberg
|
|
128
|
+
env:
|
|
129
|
+
CARGO_REGISTRIES_BIXORITY_CODEBERG_TOKEN: Bearer ${{ secrets.CODEBERG_TOKEN }}
|
|
130
|
+
|
|
131
|
+
build-wheels:
|
|
132
|
+
name: Build wheels (${{ matrix.os }} - ${{ matrix.arch }} - py${{ matrix.python-version }})
|
|
133
|
+
needs: publish-crate
|
|
134
|
+
runs-on: ${{ matrix.os }}
|
|
135
|
+
strategy:
|
|
136
|
+
fail-fast: false
|
|
137
|
+
matrix:
|
|
138
|
+
python-version: ["3.13", "3.14"]
|
|
139
|
+
os: [ubuntu-latest, macos-latest]
|
|
140
|
+
include:
|
|
141
|
+
- os: ubuntu-latest
|
|
142
|
+
arch: x86_64
|
|
143
|
+
target: x86_64-unknown-linux-gnu
|
|
144
|
+
- os: macos-latest
|
|
145
|
+
arch: aarch64
|
|
146
|
+
target: aarch64-apple-darwin
|
|
147
|
+
# - os: windows-latest
|
|
148
|
+
# arch: x86_64
|
|
149
|
+
# target: x86_64-pc-windows-msvc
|
|
150
|
+
|
|
151
|
+
steps:
|
|
152
|
+
- uses: actions/checkout@v5
|
|
153
|
+
|
|
154
|
+
- name: Set up Rust
|
|
155
|
+
uses: dtolnay/rust-toolchain@stable
|
|
156
|
+
with:
|
|
157
|
+
toolchain: stable
|
|
158
|
+
components: rustfmt, clippy
|
|
159
|
+
|
|
160
|
+
- name: Install Python
|
|
161
|
+
uses: actions/setup-python@v6
|
|
162
|
+
with:
|
|
163
|
+
python-version: "${{ matrix.python-version }}"
|
|
164
|
+
|
|
165
|
+
- name: Install maturin
|
|
166
|
+
run: pip install maturin
|
|
167
|
+
|
|
168
|
+
- name: Build wheel
|
|
169
|
+
run: |
|
|
170
|
+
maturin build \
|
|
171
|
+
--release \
|
|
172
|
+
--locked \
|
|
173
|
+
--target ${{ matrix.target }} \
|
|
174
|
+
--features python \
|
|
175
|
+
--interpreter python3
|
|
176
|
+
|
|
177
|
+
- name: Upload wheels
|
|
178
|
+
uses: actions/upload-artifact@v5
|
|
179
|
+
with:
|
|
180
|
+
name: wheels-${{ matrix.os }}-${{ matrix.arch }}-py${{ matrix.python-version }})
|
|
181
|
+
path: target/wheels/*.whl
|
|
182
|
+
|
|
183
|
+
# optional publish to PyPI
|
|
184
|
+
publish-to-pypi:
|
|
185
|
+
name: Publish to PyPI
|
|
186
|
+
runs-on: ubuntu-latest
|
|
187
|
+
needs: build-wheels
|
|
188
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
189
|
+
steps:
|
|
190
|
+
- uses: actions/checkout@v5
|
|
191
|
+
- uses: actions/download-artifact@v6
|
|
192
|
+
with:
|
|
193
|
+
path: dist
|
|
194
|
+
|
|
195
|
+
- name: Install Python + maturin
|
|
196
|
+
uses: actions/setup-python@v6
|
|
197
|
+
with:
|
|
198
|
+
python-version: "3.14"
|
|
199
|
+
|
|
200
|
+
- run: pip install maturin
|
|
201
|
+
|
|
202
|
+
- name: Build source distribution (sdist)
|
|
203
|
+
run: maturin sdist --out dist
|
|
204
|
+
|
|
205
|
+
- name: Publish to PyPI
|
|
206
|
+
env:
|
|
207
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
208
|
+
run: |
|
|
209
|
+
# Upload built wheels from matrix builds
|
|
210
|
+
find dist -name "*.whl" -exec maturin upload --skip-existing {} +
|
|
211
|
+
# Upload source distribution produced above
|
|
212
|
+
find dist -name "*.tar.gz" -exec maturin upload --skip-existing {} +
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Dependabot update - test and merge
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, reopened, synchronize]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: dependabot-automerge-${{ github.event.pull_request.number }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: Run unit tests (Dependabot PR)
|
|
14
|
+
if: github.actor == 'dependabot[bot]'
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Check out PR head
|
|
21
|
+
uses: actions/checkout@v5
|
|
22
|
+
with:
|
|
23
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
|
|
26
|
+
- name: Set up Rust toolchain
|
|
27
|
+
uses: dtolnay/rust-toolchain@stable
|
|
28
|
+
|
|
29
|
+
- name: Cache cargo build
|
|
30
|
+
uses: Swatinem/rust-cache@v2
|
|
31
|
+
|
|
32
|
+
- name: Run unit tests
|
|
33
|
+
run: cargo test --all --locked --verbose
|
|
34
|
+
|
|
35
|
+
merge:
|
|
36
|
+
name: Approve and merge
|
|
37
|
+
needs: test
|
|
38
|
+
if: needs.test.result == 'success' && github.actor == 'dependabot[bot]'
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
permissions:
|
|
41
|
+
contents: write
|
|
42
|
+
pull-requests: write
|
|
43
|
+
steps:
|
|
44
|
+
- name: Approve PR
|
|
45
|
+
uses: actions/github-script@v7
|
|
46
|
+
with:
|
|
47
|
+
script: |
|
|
48
|
+
const pr = context.payload.pull_request;
|
|
49
|
+
await github.rest.pulls.createReview({
|
|
50
|
+
owner: context.repo.owner,
|
|
51
|
+
repo: context.repo.repo,
|
|
52
|
+
pull_number: pr.number,
|
|
53
|
+
event: 'APPROVE',
|
|
54
|
+
body: 'Automated approval: tests passed for Dependabot update.'
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
- name: Merge PR
|
|
58
|
+
uses: actions/github-script@v7
|
|
59
|
+
with:
|
|
60
|
+
script: |
|
|
61
|
+
const pr = context.payload.pull_request;
|
|
62
|
+
try {
|
|
63
|
+
await github.rest.pulls.merge({
|
|
64
|
+
owner: context.repo.owner,
|
|
65
|
+
repo: context.repo.repo,
|
|
66
|
+
pull_number: pr.number,
|
|
67
|
+
merge_method: 'merge'
|
|
68
|
+
});
|
|
69
|
+
core.info('PR merged successfully.');
|
|
70
|
+
} catch (e) {
|
|
71
|
+
core.setFailed('Failed to merge PR: ' + e.message);
|
|
72
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Cargo
|
|
2
|
+
# will have compiled files and executables
|
|
3
|
+
debug
|
|
4
|
+
target
|
|
5
|
+
|
|
6
|
+
# These are backup files generated by rustfmt
|
|
7
|
+
**/*.rs.bk
|
|
8
|
+
|
|
9
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
10
|
+
*.pdb
|
|
11
|
+
|
|
12
|
+
# Generated by cargo mutants
|
|
13
|
+
# Contains mutation testing data
|
|
14
|
+
**/mutants.out*/
|
|
15
|
+
|
|
16
|
+
# RustRover
|
|
17
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
18
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
19
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
20
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
21
|
+
.idea/
|
|
22
|
+
|
|
23
|
+
#Cargo.lock
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
==3.14.3
|