momento-signer


Namemomento-signer JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://gomomento.com
SummarySigned URL SDK for Momento
upload_time2024-03-25 18:59:40
maintainerNone
docs_urlNone
authorMomento
requires_python<4.0,>=3.7
licenseApache-2.0
keywords momento caching key-value store serverless
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Momento client-sdk-python-signer

:warning: Experimental SDK :warning:

Python SDK for Momento is experimental and under active development.
There could be non-backward compatible changes or removal in the future.
Please be aware that you may need to update your source code with the current version of the SDK when its version gets upgraded.

---

<br/>

Python SDK for Momento, a serverless cache that automatically scales without any of the operational overhead required by traditional caching solutions.

<br/>

## Getting Started :running:

### Requirements

- [Python 3.7](https://www.python.org/downloads/) or above is required
- A Momento Auth Token is required, you can generate one using the [Momento CLI](https://github.com/momentohq/momento-cli)

<br/>

### Installing Momento and Running the Example

Check out our [Python SDK example](/examples/)!

<br/>

### Using Momento

```python
import os
from momento import simple_cache_client as scc

# Initializing Momento
_MOMENTO_AUTH_TOKEN = os.getenv('MOMENTO_AUTH_TOKEN')
_ITEM_DEFAULT_TTL_SECONDS = 60
with scc.SimpleCacheClient(_MOMENTO_AUTH_TOKEN, _ITEM_DEFAULT_TTL_SECONDS) as cache_client:
    # Creating a cache named "cache"
    _CACHE_NAME = 'cache'
    cache_client.create_cache(_CACHE_NAME)

    # Sets key with default TTL and get value with that key
    _KEY = 'MyKey'
    _VALUE = 'MyValue'
    cache_client.set(_CACHE_NAME, _KEY, _VALUE)
    get_resp = cache_client.get(_CACHE_NAME, _KEY)
    print(f'Looked up Value: {str(get_resp.value())}')

    # Sets key with TTL of 5 seconds
    cache_client.set(_CACHE_NAME, _KEY, _VALUE, 5)

    # Permanently deletes cache
    cache_client.delete_cache(_CACHE_NAME)
```

<br/>

            

Raw data

            {
    "_id": null,
    "home_page": "https://gomomento.com",
    "name": "momento-signer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": null,
    "keywords": "Momento, caching, key-value store, serverless",
    "author": "Momento",
    "author_email": "hello@momentohq.com",
    "download_url": "https://files.pythonhosted.org/packages/93/4e/70bb05b555d3d525b21965e8bf1fd6fd285731ed4915e201ca4f201ed230/momento_signer-0.2.0.tar.gz",
    "platform": null,
    "description": "# Momento client-sdk-python-signer\n\n:warning: Experimental SDK :warning:\n\nPython SDK for Momento is experimental and under active development.\nThere could be non-backward compatible changes or removal in the future.\nPlease be aware that you may need to update your source code with the current version of the SDK when its version gets upgraded.\n\n---\n\n<br/>\n\nPython SDK for Momento, a serverless cache that automatically scales without any of the operational overhead required by traditional caching solutions.\n\n<br/>\n\n## Getting Started :running:\n\n### Requirements\n\n- [Python 3.7](https://www.python.org/downloads/) or above is required\n- A Momento Auth Token is required, you can generate one using the [Momento CLI](https://github.com/momentohq/momento-cli)\n\n<br/>\n\n### Installing Momento and Running the Example\n\nCheck out our [Python SDK example](/examples/)!\n\n<br/>\n\n### Using Momento\n\n```python\nimport os\nfrom momento import simple_cache_client as scc\n\n# Initializing Momento\n_MOMENTO_AUTH_TOKEN = os.getenv('MOMENTO_AUTH_TOKEN')\n_ITEM_DEFAULT_TTL_SECONDS = 60\nwith scc.SimpleCacheClient(_MOMENTO_AUTH_TOKEN, _ITEM_DEFAULT_TTL_SECONDS) as cache_client:\n    # Creating a cache named \"cache\"\n    _CACHE_NAME = 'cache'\n    cache_client.create_cache(_CACHE_NAME)\n\n    # Sets key with default TTL and get value with that key\n    _KEY = 'MyKey'\n    _VALUE = 'MyValue'\n    cache_client.set(_CACHE_NAME, _KEY, _VALUE)\n    get_resp = cache_client.get(_CACHE_NAME, _KEY)\n    print(f'Looked up Value: {str(get_resp.value())}')\n\n    # Sets key with TTL of 5 seconds\n    cache_client.set(_CACHE_NAME, _KEY, _VALUE, 5)\n\n    # Permanently deletes cache\n    cache_client.delete_cache(_CACHE_NAME)\n```\n\n<br/>\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Signed URL SDK for Momento",
    "version": "0.2.0",
    "project_urls": {
        "Documentation": "https://docs.momentohq.com/",
        "Homepage": "https://gomomento.com",
        "Repository": "https://github.com/momentohq/client-sdk-python-signed-urls"
    },
    "split_keywords": [
        "momento",
        " caching",
        " key-value store",
        " serverless"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a3a751a0a0ad1b4589381f70c9a11774d60170153718c8a5d98b05c1ac69852",
                "md5": "1c444b0bbd2c665ab0c919f9d1652b50",
                "sha256": "024afee8057b8013f1e97bcc1faff6ddad08ce827b25b9959ed433172a6bc42a"
            },
            "downloads": -1,
            "filename": "momento_signer-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1c444b0bbd2c665ab0c919f9d1652b50",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 8466,
            "upload_time": "2024-03-25T18:59:39",
            "upload_time_iso_8601": "2024-03-25T18:59:39.183143Z",
            "url": "https://files.pythonhosted.org/packages/3a/3a/751a0a0ad1b4589381f70c9a11774d60170153718c8a5d98b05c1ac69852/momento_signer-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "934e70bb05b555d3d525b21965e8bf1fd6fd285731ed4915e201ca4f201ed230",
                "md5": "35198a7bc0073893a6e8648342426eaa",
                "sha256": "1de297a8abb1085a1475baa6f7afd10d16cf205e10b0765d83441b7a0d9e374b"
            },
            "downloads": -1,
            "filename": "momento_signer-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "35198a7bc0073893a6e8648342426eaa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 9114,
            "upload_time": "2024-03-25T18:59:40",
            "upload_time_iso_8601": "2024-03-25T18:59:40.799379Z",
            "url": "https://files.pythonhosted.org/packages/93/4e/70bb05b555d3d525b21965e8bf1fd6fd285731ed4915e201ca4f201ed230/momento_signer-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 18:59:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "momentohq",
    "github_project": "client-sdk-python-signed-urls",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "momento-signer"
}
        
Elapsed time: 0.21568s