clockcaptcha


Nameclockcaptcha JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryDynamically generated, AI-resistant captcha images
upload_time2024-09-14 12:56:20
maintainerNone
docs_urlNone
authorStefan Stojanovic
requires_python>=3.9
licenseMIT License Copyright (c) 2024 Stefan Stojanovic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords captcha captcha-generator captcha-image clock digital python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # clockcaptcha
Dynamically generated, AI-resistant captcha images. 

![captcha](https://raw.githubusercontent.com/stefs304/clockcaptcha/master/color-captcha.png)

*Can you tell what time it is? AI can't.*

> Features:
> * dynamically generated images
> * rgb and grayscale color mode
> * 12-hour and 24-hour clock mode
> * custom colors

### Installation

```shell
pip install clockcaptcha
```

### Usage

```python
from clockcaptcha import ClockCaptcha

captcha = ClockCaptcha()
print(captcha.value)

captcha.verify('0645') # True/False
captcha.save_image('image.png')

# generate new captcha
captcha.generate_new()

```
Choose between `color_mode='rgb'` ([color-captcha.png](color-captcha.png)) 
or `'grayscale'` ([grayscale-captcha.png](grayscale-captcha.png)). 

Pick between a 12-hour or a 24-hour `clock_mode`.
```python
from clockcaptcha import ClockCaptcha

captcha = ClockCaptcha(clock_mode=12)
```

Image size can be changed with relative `size` parameter. Here are corresponding pixel values. 

| size  | width   | height  |
|-------|---------|---------|
| 1     | 190     | 65      |
| 2     | 380     | 130     |
| **3** | **570** | **195** |
| 4 | 760 | 260 |
| ... | ... | ... | 

Change colors globally:
```python
from clockcaptcha import ClockCaptcha
ClockCaptcha.set_colors([
    '#FFFFFF',
    '#000000',
    '#999999'
])
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "clockcaptcha",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "captcha, captcha-generator, captcha-image, clock, digital, python",
    "author": "Stefan Stojanovic",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c2/05/58bc580262d416b06f40cbf0cbaf5997dca48a50bd3f347d2e5d7ab59f1c/clockcaptcha-0.1.3.tar.gz",
    "platform": null,
    "description": "# clockcaptcha\nDynamically generated, AI-resistant captcha images. \n\n![captcha](https://raw.githubusercontent.com/stefs304/clockcaptcha/master/color-captcha.png)\n\n*Can you tell what time it is? AI can't.*\n\n> Features:\n> * dynamically generated images\n> * rgb and grayscale color mode\n> * 12-hour and 24-hour clock mode\n> * custom colors\n\n### Installation\n\n```shell\npip install clockcaptcha\n```\n\n### Usage\n\n```python\nfrom clockcaptcha import ClockCaptcha\n\ncaptcha = ClockCaptcha()\nprint(captcha.value)\n\ncaptcha.verify('0645') # True/False\ncaptcha.save_image('image.png')\n\n# generate new captcha\ncaptcha.generate_new()\n\n```\nChoose between `color_mode='rgb'` ([color-captcha.png](color-captcha.png)) \nor `'grayscale'` ([grayscale-captcha.png](grayscale-captcha.png)). \n\nPick between a 12-hour or a 24-hour `clock_mode`.\n```python\nfrom clockcaptcha import ClockCaptcha\n\ncaptcha = ClockCaptcha(clock_mode=12)\n```\n\nImage size can be changed with relative `size` parameter. Here are corresponding pixel values. \n\n| size  | width   | height  |\n|-------|---------|---------|\n| 1     | 190     | 65      |\n| 2     | 380     | 130     |\n| **3** | **570** | **195** |\n| 4 | 760 | 260 |\n| ... | ... | ... | \n\nChange colors globally:\n```python\nfrom clockcaptcha import ClockCaptcha\nClockCaptcha.set_colors([\n    '#FFFFFF',\n    '#000000',\n    '#999999'\n])\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Stefan Stojanovic  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Dynamically generated, AI-resistant captcha images",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/stefs304/clockcaptcha",
        "Issues": "https://github.com/stefs304/clockcaptcha/issues"
    },
    "split_keywords": [
        "captcha",
        " captcha-generator",
        " captcha-image",
        " clock",
        " digital",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec97763b26c15329b17a4b28d7e0979a2b9e4d99b829b5b2f8e94340eb3b951f",
                "md5": "50d0add914b5860cafef5a8856ec3ae2",
                "sha256": "8a15f70b1941ef5aaf3cac2878e0947f3d35b26ddb6ecd25f7cbf8b635b893d5"
            },
            "downloads": -1,
            "filename": "clockcaptcha-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "50d0add914b5860cafef5a8856ec3ae2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6160,
            "upload_time": "2024-09-14T12:56:18",
            "upload_time_iso_8601": "2024-09-14T12:56:18.875621Z",
            "url": "https://files.pythonhosted.org/packages/ec/97/763b26c15329b17a4b28d7e0979a2b9e4d99b829b5b2f8e94340eb3b951f/clockcaptcha-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c20558bc580262d416b06f40cbf0cbaf5997dca48a50bd3f347d2e5d7ab59f1c",
                "md5": "770d923fa98ea4ce69e851264bb0330f",
                "sha256": "f6eec9394086268c0d900fd804aea4d48e2443b749a30bf79b41cfed15d43b2b"
            },
            "downloads": -1,
            "filename": "clockcaptcha-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "770d923fa98ea4ce69e851264bb0330f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 23831,
            "upload_time": "2024-09-14T12:56:20",
            "upload_time_iso_8601": "2024-09-14T12:56:20.405956Z",
            "url": "https://files.pythonhosted.org/packages/c2/05/58bc580262d416b06f40cbf0cbaf5997dca48a50bd3f347d2e5d7ab59f1c/clockcaptcha-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-14 12:56:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stefs304",
    "github_project": "clockcaptcha",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "clockcaptcha"
}
        
Elapsed time: 1.08369s