Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binary blob upload, download client methods #92

Merged
merged 10 commits into from
Feb 20, 2023
Merged

Conversation

smkent
Copy link
Owner

@smkent smkent commented Feb 20, 2023

This adds two new client methods for interacting with binary data, upload_blob and download_attachment.

The JMAP spec has protocol information on binary data upload and download: https://jmap.io/spec-core.html#binary-data

@smkent smkent changed the title Add upload, download client methods Add binary blob upload, download client methods Feb 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #92 (d8c5f51) into main (6f5c14f) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##              main       #92   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines         1068      1093   +25     
=========================================
+ Hits          1068      1093   +25     
Impacted Files Coverage Δ
jmapc/__init__.py 100.00% <ø> (ø)
jmapc/models/__init__.py 100.00% <ø> (ø)
jmapc/client.py 100.00% <100.00%> (ø)
jmapc/models/models.py 100.00% <100.00%> (ø)
jmapc/session.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@smkent smkent merged commit 6489aab into main Feb 20, 2023
@smkent smkent deleted the blob-upload-download branch February 20, 2023 05:33
smkent added a commit that referenced this pull request Feb 22, 2023
Applied updates from upstream project template commits:

smkent/cookie-python@4fe836a...41468dd

*   41468dd Merge pull request #94 from smkent/pyupgrade-keep-runtime-typing
|\
| * 82b8568 Add --keep-runtime-typing to pyupgrade args
|/
*   c83e9f4 Merge pull request #93 from smkent/manage-run-env
|\
| * 4a161e4 Include PYTHON_KEYRING_BACKEND in repo run commands env
|/
*   f6ac9b1 Merge pull request #92 from smkent/manage-update-pr-html-url
|\
| * 30372bf Log opened PR's HTML URL instead of API URL in manage-cookie update
|/
*   26efcfa Merge pull request #91 from smkent/manage-cookie
|\
| * 91b6a89 Set PYTHON_KEYRING_BACKEND for poetry within unit tests
| * cf0f69a Apply automatic linting fixes
| * 582d618 Update project template cruft
|/
*   c4899ec Merge pull request #90 from smkent/cruft-json-reset
|\
| * f61ed02 Replace repo_reset with .cruft.json checkout
|/
*   f5e42d6 Merge pull request #88 from smkent/autoflake-pyupgrade
|\
| *   0d9d2ea Merge branch 'main' into autoflake-pyupgrade
| |\
| |/
|/|
* |   a4fec71 Merge pull request #89 from smkent/fix-pyproject-version
|\ \
| * | 62b1b68 Configure pyproject.toml build-backend for poetry-dynamic-versioning
| * | 85d5f74 Enable poetry-dynamic-versioning in pyproject.toml
| * | 549fc6e Update python-poetry action from template
| * | 1001f3e Add __version__.py
| * | 42f765f Remove fixed version string from pyproject.toml
|/ /
| * d5f398c Add autoflake to pre-commit config
| * dda7315 Add pyupgrade to pre-commit config
|/
*   429b0c8 Merge pull request #87 from smkent/manage-cookie-branch-name
|\
| * 21aceda Tweak manage-cookie branch name
|/
*   a3f5e77 Merge pull request #86 from smkent/update-cookie
|\
| * a7ec03b Update dependencies
|/
*   432da6a Merge pull request #85 from smkent/reference-self-current-dir
|\
| * 3368613 Reference own template via current directory instead of URL
|/
*   8ea43c8 Merge pull request #84 from smkent/skip-empty-updates
|\
| * 0199bed Rework repository reset as a decorator
| * ee6e1de Reset repository working directory if skipping cruft update
| * 41940ba Capture output in git status command
| * 508f99d Skip cruft updates without template modifications
|/
*   1b2d5ae Merge pull request #83 from smkent/ci-cd-pypi
|\
| * 3366570 Enable publishing to PyPI
| * 77d2309 Apply CI/CD workflow updates from template
|/
*   2c96f9e Merge pull request #82 from smkent/readme-badges
|\
| *   5820d18 Merge remote-tracking branch 'origin/main' into readme-badges
| |\
| |/
|/|
* |   c49a336 Merge pull request #81 from smkent/manage-main-loop
|\ \
| * | 653af5b Move repository iteration loop to manage-cookie main function
|/ /
| * 0de67eb Add PyPI badges to README.md
| * 01a9943 Add codecov badge to README.md
|/
*   de9e951 Merge pull request #80 from smkent/github-api
|\
| * 3343a19 Remove now-unused subprocess.run mock
| * d4fe333 Use PyGithub to create and locate releases
| * 77109a6 Mock PyGithub in unit tests, rename API token env var
| * b523f8e Use PyGithub for pull request creation, deletion
| * 7ef5da8 Use PyGithub to resolve repository from CLI params
| * 101cf80 Add pygithub
|/
*   faaf379 Merge pull request #78 from smkent/replace-pr
|\
| * 39a7465 Log opened PR URL
| * e89cc06 Close existing PR on update
| * 0305500 Don't check for existing branch on remote at clone time
* c21e45e Merge pull request #79 from smkent/release-log-fixup
* 163d273 Fix release log message wording

Updated project dependencies via `poetry update`:

Package operations: 0 installs, 1 update, 0 removals

- Updating setuptools (67.3.3 -> 67.4.0)
smkent added a commit that referenced this pull request Feb 23, 2023
Applied updates from upstream project template commits:

smkent/cookie-python@4fe836a...ae5c427

*   ae5c427 Merge pull request #95 from smkent/container-version
|\
| * a813ce2 Enable and test container build in test_new_cookie_create
| * 3f2debd Update docker action versions in template's container.yml
| * 9ac5896 Escape `{{` in template container.yml
| * a99ca57 Fix container build with updated poetry-dynamic-versioning
|/
*   41468dd Merge pull request #94 from smkent/pyupgrade-keep-runtime-typing
|\
| * 82b8568 Add --keep-runtime-typing to pyupgrade args
|/
*   c83e9f4 Merge pull request #93 from smkent/manage-run-env
|\
| * 4a161e4 Include PYTHON_KEYRING_BACKEND in repo run commands env
|/
*   f6ac9b1 Merge pull request #92 from smkent/manage-update-pr-html-url
|\
| * 30372bf Log opened PR's HTML URL instead of API URL in manage-cookie update
|/
*   26efcfa Merge pull request #91 from smkent/manage-cookie
|\
| * 91b6a89 Set PYTHON_KEYRING_BACKEND for poetry within unit tests
| * cf0f69a Apply automatic linting fixes
| * 582d618 Update project template cruft
|/
*   c4899ec Merge pull request #90 from smkent/cruft-json-reset
|\
| * f61ed02 Replace repo_reset with .cruft.json checkout
|/
*   f5e42d6 Merge pull request #88 from smkent/autoflake-pyupgrade
|\
| *   0d9d2ea Merge branch 'main' into autoflake-pyupgrade
| |\
| |/
|/|
* |   a4fec71 Merge pull request #89 from smkent/fix-pyproject-version
|\ \
| * | 62b1b68 Configure pyproject.toml build-backend for poetry-dynamic-versioning
| * | 85d5f74 Enable poetry-dynamic-versioning in pyproject.toml
| * | 549fc6e Update python-poetry action from template
| * | 1001f3e Add __version__.py
| * | 42f765f Remove fixed version string from pyproject.toml
|/ /
| * d5f398c Add autoflake to pre-commit config
| * dda7315 Add pyupgrade to pre-commit config
|/
*   429b0c8 Merge pull request #87 from smkent/manage-cookie-branch-name
|\
| * 21aceda Tweak manage-cookie branch name
|/
*   a3f5e77 Merge pull request #86 from smkent/update-cookie
|\
| * a7ec03b Update dependencies
|/
*   432da6a Merge pull request #85 from smkent/reference-self-current-dir
|\
| * 3368613 Reference own template via current directory instead of URL
|/
*   8ea43c8 Merge pull request #84 from smkent/skip-empty-updates
|\
| * 0199bed Rework repository reset as a decorator
| * ee6e1de Reset repository working directory if skipping cruft update
| * 41940ba Capture output in git status command
| * 508f99d Skip cruft updates without template modifications
|/
*   1b2d5ae Merge pull request #83 from smkent/ci-cd-pypi
|\
| * 3366570 Enable publishing to PyPI
| * 77d2309 Apply CI/CD workflow updates from template
|/
*   2c96f9e Merge pull request #82 from smkent/readme-badges
|\
| *   5820d18 Merge remote-tracking branch 'origin/main' into readme-badges
| |\
| |/
|/|
* |   c49a336 Merge pull request #81 from smkent/manage-main-loop
|\ \
| * | 653af5b Move repository iteration loop to manage-cookie main function
|/ /
| * 0de67eb Add PyPI badges to README.md
| * 01a9943 Add codecov badge to README.md
|/
*   de9e951 Merge pull request #80 from smkent/github-api
|\
| * 3343a19 Remove now-unused subprocess.run mock
| * d4fe333 Use PyGithub to create and locate releases
| * 77109a6 Mock PyGithub in unit tests, rename API token env var
| * b523f8e Use PyGithub for pull request creation, deletion
| * 7ef5da8 Use PyGithub to resolve repository from CLI params
| * 101cf80 Add pygithub
|/
*   faaf379 Merge pull request #78 from smkent/replace-pr
|\
| * 39a7465 Log opened PR URL
| * e89cc06 Close existing PR on update
| * 0305500 Don't check for existing branch on remote at clone time
* c21e45e Merge pull request #79 from smkent/release-log-fixup
* 163d273 Fix release log message wording

Updated project dependencies via `poetry update`:

Package operations: 0 installs, 3 updates, 0 removals

- Updating setuptools (67.3.3 -> 67.4.0)
- Updating coverage (7.1.0 -> 7.2.0)
- Updating pre-commit (3.0.4 -> 3.1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants