H51


NameH51 JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/GetmeUK/h51-python
SummaryThe H51 Python library provides a pythonic interface to the H51 API.
upload_time2023-07-18 15:35:54
maintainerAnthony Blackshaw
docs_urlNone
authorAnthony Blackshaw
requires_python
licenseMIT
keywords api h51
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # H51 Python Library

The H51 Python library provides a pythonic interface to the H51 API. It includes an API client class, a set of resource classes and classes for configuring core analyzers and transforms.


## Installation

```
pip install h51
```

## Requirements

- Python 3.7+


# Usage

```Python

import h51


client = h51.Client('your_api_key...')

# Create an asset
with open('image.bmp') as f:
    asset = h51.resources.Asset.create(client, f)

# Analyze the image asset to find its dominant colours and focal point
asset.analyze([
    h51.analyzers.images.DominantColors(),
    h51.analyzers.images.FocalPoint()
])

# Create web optimized variations of the image
h51.resources.Variation.create(
    asset,
    {
        'x1': [
            h51.transforms.images.AutoOrient(),
            h51.transforms.images.FocalPointCrop(aspect_ratio=0.5),
            h51.transforms.images.Fit(640, 640),
            h51.transforms.images.Output('WebP')
        ],
        'x2': [
            h51.transforms.images.AutoOrient(),
            h51.transforms.images.FocalPointCrop(aspect_ratio=0.5),
            h51.transforms.images.Fit(1280, 1280),
            h51.transforms.images.Output('WebP')
        ]
    }
)

```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GetmeUK/h51-python",
    "name": "H51",
    "maintainer": "Anthony Blackshaw",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "ant@getme.co.uk",
    "keywords": "api h51",
    "author": "Anthony Blackshaw",
    "author_email": "ant@getme.co.uk",
    "download_url": "https://files.pythonhosted.org/packages/16/b7/668e866c025937ee4214160382213498f7264459f1342bbbad529eced7fc/H51-0.0.9.tar.gz",
    "platform": null,
    "description": "# H51 Python Library\n\nThe H51 Python library provides a pythonic interface to the H51 API. It includes an API client class, a set of resource classes and classes for configuring core analyzers and transforms.\n\n\n## Installation\n\n```\npip install h51\n```\n\n## Requirements\n\n- Python 3.7+\n\n\n# Usage\n\n```Python\n\nimport h51\n\n\nclient = h51.Client('your_api_key...')\n\n# Create an asset\nwith open('image.bmp') as f:\n    asset = h51.resources.Asset.create(client, f)\n\n# Analyze the image asset to find its dominant colours and focal point\nasset.analyze([\n    h51.analyzers.images.DominantColors(),\n    h51.analyzers.images.FocalPoint()\n])\n\n# Create web optimized variations of the image\nh51.resources.Variation.create(\n    asset,\n    {\n        'x1': [\n            h51.transforms.images.AutoOrient(),\n            h51.transforms.images.FocalPointCrop(aspect_ratio=0.5),\n            h51.transforms.images.Fit(640, 640),\n            h51.transforms.images.Output('WebP')\n        ],\n        'x2': [\n            h51.transforms.images.AutoOrient(),\n            h51.transforms.images.FocalPointCrop(aspect_ratio=0.5),\n            h51.transforms.images.Fit(1280, 1280),\n            h51.transforms.images.Output('WebP')\n        ]\n    }\n)\n\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The H51 Python library provides a pythonic interface to the H51 API.",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/GetmeUK/h51-python"
    },
    "split_keywords": [
        "api",
        "h51"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16b7668e866c025937ee4214160382213498f7264459f1342bbbad529eced7fc",
                "md5": "da0e1549b9281f8f5ef4cf3786071ace",
                "sha256": "47dd7ac250c357f5cbcedf0a539e7461c6588435fd29d8f4b53aff6645433153"
            },
            "downloads": -1,
            "filename": "H51-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "da0e1549b9281f8f5ef4cf3786071ace",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10414,
            "upload_time": "2023-07-18T15:35:54",
            "upload_time_iso_8601": "2023-07-18T15:35:54.837720Z",
            "url": "https://files.pythonhosted.org/packages/16/b7/668e866c025937ee4214160382213498f7264459f1342bbbad529eced7fc/H51-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-18 15:35:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GetmeUK",
    "github_project": "h51-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "h51"
}
        
Elapsed time: 0.08778s