Package that just pre-signs
Project description
Libpresign
Single-purpose library created for generating AWS S3 presigned URLs fast.
Implemented in C++ using OpenSSL 3.1.
Moto
Boto3 is heavy dependency if you just want to create a presigned URL. And it's famously slow.
How to use
import libpresign
libpresign.get(
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
"region-1",
"bucket-name",
"object-key.txt",
3600, # Expiration time in seconds
)
Output
'https://bucket.s3.amazonaws.com/object-key.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=creds1%2F20230711%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230711T125101Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=5c5a2e2858261266db950e4912fb12ffcd5d0bcf40d873bf9fe209ee789f6c86'
Function signature
def get(
access_key_id: str,
secret_access_key: str,
region: Optional[str], # defaults to "us-east-1"
bucket: str,
key: str,
expires: Optional[str], # defaults to 3600 (1h)
):
...
Comparison to boto3
Test case
Generate 10 000 presigned URLs. Compare execution times
Results
┌────────────────────────┬────────┬────────────┐
│ library │ boto3 │ libpresign │
├────────────────────────┼────────┼────────────┤
│ avg execution time, μs │ 2232.3 │ 13.9 │
└────────────────────────┴────────┴────────────┘
Libpresign came out to be 160 times faster
Dependencies
- GNU C Compiler
- OpenSSL
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file libpresign-1.0.0.tar.gz
.
File metadata
- Download URL: libpresign-1.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e1ae76e91f6df5998eea5b64f4f178701143a128033ead5ccaeb93e25773075 |
|
MD5 | 7ba5b035c2f0f438bd004292a1f81526 |
|
BLAKE2b-256 | 998754a4a60105f30a86b38587847b3f92cf316aa17b2c4ed6ac490dafb0d89f |
File details
Details for the file libpresign-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97f73247332125f14803807525616689f1775017636f8dc4eaec450583a93cc1 |
|
MD5 | fadf2b375978a2a334da8049666fe03e |
|
BLAKE2b-256 | 849616c87f9791874427a90244c43417366a169f80f656ee7ab135e9f6548b32 |
File details
Details for the file libpresign-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f84686e19f1ef8302ccdf836a87e77bc60c6a343be96faadcc31f65d706c957 |
|
MD5 | 3a2de2e83c31d548d0c8d5c39a2c7ec8 |
|
BLAKE2b-256 | 117d0d2191407e8f6d343c5e36a38c45463c32d75b44b0abfe337c275aa83f62 |
File details
Details for the file libpresign-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0a0fb25741ac18244ddc87a750229529b10d1d5ced17cc531243edd26960af3 |
|
MD5 | 5931a8d60e6682ba5ed36201844ae9a9 |
|
BLAKE2b-256 | 0343db1e61744854deb124cb86ae4d93499db5b824c7f104581114bc4d970381 |
File details
Details for the file libpresign-1.0.0-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 12.7 kB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9b8690995e31101f8a088d2dd6dddc6eda1c7c9cd6e31027f4eb64c86f609a7 |
|
MD5 | a5eb6852165b860412b708c85d94344f |
|
BLAKE2b-256 | ede0a74d9004d61c4a356777a3600af8147dacb21f99b90ad291dadd5a586342 |
File details
Details for the file libpresign-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f53bcafa2e1b52dcda4e317ae9807a6169542221de635aa0e9761abc13ca7ceb |
|
MD5 | 24b4a6ad7b3f7c2e5340865a98d869e7 |
|
BLAKE2b-256 | 5e966ee6acb90685418f1c516792dfb34fded2988bb5171973e7bd2cf3381ce3 |
File details
Details for the file libpresign-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1088e001f6934ac942dc573eba09d63623de271e3e830b49d2c185b3c8bd543 |
|
MD5 | d4a88aed0ed4c9b373f5a7e005f793f4 |
|
BLAKE2b-256 | d14c2f8010e8bafaadca31289072d05c209b7a494f906bf9902df2e6e81a9690 |
File details
Details for the file libpresign-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d9b1494c315f68e4d857f58fac4ee9814764e45602ab460291250efd8b0aa64 |
|
MD5 | b32791db1933334849a971744bd24be9 |
|
BLAKE2b-256 | c0ff84ad86f4dc62d3375b10894153dc490c51f17107ec5283b76258634845c3 |
File details
Details for the file libpresign-1.0.0-cp311-cp311-macosx_13_0_arm64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp311-cp311-macosx_13_0_arm64.whl
- Upload date:
- Size: 12.9 kB
- Tags: CPython 3.11, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a125d03e8ad5a2ad5ad6f3593e0a048251e6a4e56c01c92d14c9a00f59150bda |
|
MD5 | 8fc4868da3b4f4261fc877c0f1c434ca |
|
BLAKE2b-256 | b08647052278df83f96f7217bd207d8d41e884303b593c3bd216c8301c76bca8 |
File details
Details for the file libpresign-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32f8dfb88916f1b0ff5e54c0449c11376e1255b7f062eb1905a2ed4b334327a |
|
MD5 | a17de245bbc0f79ee7388beab72b2c47 |
|
BLAKE2b-256 | b354ad2b6b601747197c1202145466686cb74ac03f05dab50ea5ef647b800219 |
File details
Details for the file libpresign-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae83116238b9f56e695fb3b482721d1e3388c8a244f7a6d5dd24b9bb040ab05 |
|
MD5 | bba353c91ab931506f54e7cfb636e0ad |
|
BLAKE2b-256 | 059630f56b862ee3f742590712154c2bb367830f05f9396550dc7f7db265e884 |
File details
Details for the file libpresign-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f145f6fd962fa2b1c5a84ad69aa79b13a9ff782237f058bdde57bbe1233b4962 |
|
MD5 | f145db8f38bcb8ddde26268028905a54 |
|
BLAKE2b-256 | 70f1821fff39d1aae01583b4cf977d955a0fefcfa3d48b88c4a67552755199ed |
File details
Details for the file libpresign-1.0.0-cp310-cp310-macosx_13_0_arm64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp310-cp310-macosx_13_0_arm64.whl
- Upload date:
- Size: 12.9 kB
- Tags: CPython 3.10, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a791bb106e189a78a6f47bdba350c0ff43dd473ed02472aba6c081b970cb18b5 |
|
MD5 | c2b7d381d2da9bf49ee52b3e4603851d |
|
BLAKE2b-256 | effdfb42cb245f1443ba1904fe6d038631b35ac83c78bf1994e9c516d0b2cc43 |
File details
Details for the file libpresign-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8556b20b1f75d8241e6d9814a141e44b8e1ef3cddaa06f771c4c12bfd6af192f |
|
MD5 | c9d6d8add62e12abedb5354439bbb07a |
|
BLAKE2b-256 | e0b6ebb67ad98571971ec36540a20da5082b6c50fd00d12271f0e3803c45665b |
File details
Details for the file libpresign-1.0.0-cp39-cp39-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp39-cp39-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8c472f90a02cdb652be512b46b61ca951358b74bfab557abf38ec58ab7163fa |
|
MD5 | 0a6950666425237a1861e9ac82eaa430 |
|
BLAKE2b-256 | 0f100b4da52b530b5610d1dc4b3a537129f755b0c23de50f2e6a958925130dc4 |
File details
Details for the file libpresign-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4660e134d75d385fa6b6c3963eff3756db9622bb25de63cfe2d20c1d5a3a5fbb |
|
MD5 | c10668a56d5187b594eb1f4a175ad0e3 |
|
BLAKE2b-256 | 2a5fc866980e24c6efd80fa5217a94e08faa42e6ece5df07f777ad48cfad15d2 |
File details
Details for the file libpresign-1.0.0-cp39-cp39-macosx_13_0_arm64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp39-cp39-macosx_13_0_arm64.whl
- Upload date:
- Size: 12.9 kB
- Tags: CPython 3.9, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda5962cb31df033e0832a0a28a8c8f7ca55def1991b782e33ff19cffd4d3c53 |
|
MD5 | 7843e1d1ec40d62f917d9720dc98c585 |
|
BLAKE2b-256 | 81417a50d873ebba05d1d086015a39af45df583229c4d4504fa644cd4314ff6b |
File details
Details for the file libpresign-1.0.0-cp38-cp38-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abe25b19dc77b44c63bb9467a71edfa5411b9a41dd0f3d46c14f8a240c06292 |
|
MD5 | 006a8b21b4bc28e6773489e02fe35b07 |
|
BLAKE2b-256 | a8c99c5b36e7be884223fe1f2cce475545c39ea210b246785bbf35ebfa1cb3cf |
File details
Details for the file libpresign-1.0.0-cp38-cp38-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp38-cp38-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcca347f060d0ab00c074d8f30f030222ea686d7ef372259fa13c81d15dc7cc4 |
|
MD5 | 05ec4324ca7174f9e64720e4ccaabc89 |
|
BLAKE2b-256 | 1c9a9a228ad4526a1cad1ef1bedcd8258df9b07e9d41bea29c1ee6ac8249ab2b |
File details
Details for the file libpresign-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e58315c33c6f26b0b5c4cfd675ada4be914580a0339d09921bf0dde2fd39881 |
|
MD5 | fe7b3641656eebc2a973f3df0ebe3160 |
|
BLAKE2b-256 | 99382278bef9c919d0ab8f968982a3b4134b45557ebda4c42d20fb621fd1ed9a |
File details
Details for the file libpresign-1.0.0-cp38-cp38-macosx_13_0_arm64.whl
.
File metadata
- Download URL: libpresign-1.0.0-cp38-cp38-macosx_13_0_arm64.whl
- Upload date:
- Size: 12.9 kB
- Tags: CPython 3.8, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20691f4251ea01fb4f035f98cb4c7ed309efb72d1e6d42c7575b5ad61104c489 |
|
MD5 | d0cf506d6bf6b6680eb685f442945976 |
|
BLAKE2b-256 | f7a24e215d7a8026c2a88ba73090ddcc3191f4604c4c67bc046864a21ef14444 |