# Python Casim
[![PyPI](https://img.shields.io/pypi/v/py-casim.svg)](https://pypi.org/project/py-casim/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py-casim)
[![Build Status](https://travis-ci.org/Sergeileduc/py-casim.svg?branch=master)](https://travis-ci.org/Sergeileduc/py-casim)
[![Documentation Status](https://readthedocs.org/projects/py-casim/badge/?version=latest)](https://py-casim.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/Sergeileduc/py-casim/branch/master/graph/badge.svg)](https://codecov.io/gh/Sergeileduc/py-casim)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b920474aee1b4a05bfa030606f1e1aef)](https://www.codacy.com/gh/Sergeileduc/py-casim/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Sergeileduc/py-casim&utm_campaign=Badge_Grade)
Python package and cli to upload image on Casimages.
## In python project
```python
from py_casim import Casim
c = Casim("my_image.jpg")
link = c.get_link()
print(link)
```
To resize an image :
```python
from py_casim import Casim
c = Casim("my_image.jpg", resize=640)
link = c.get_link()
print(link)
```
To get another url/code return :
```python
from py_casim import Casim
c = Casim("my_image.jpg", resize=640)
link = c.get_share_code(3) # return HTML code
```
See the doc for details.
## From command line
```console
foo@bar:~$ py-casim my_image.jpg
https://nsa40.casimages.com/img/xxxxxxxxxxxxxxx.png
```
or with options :
```console
foo@bar:~$ py-casim --size 640 my_image.jpg
https://nsa40.casimages.com/img/xxxxxxxxxxxxxxx.png
```
* Free software: MIT license
* Documentation: <https://py-casim.readthedocs.io>.
### Features
* upload image and get his url
* python package (import) OR command line tool
## Dev
There's an alternative to `make` called `invoke` (Makefile equivalent is tasks.py)
`pip install invoke`
```shell
inv test
inv lint
inv coverage
inv --list
```
### Credits
This package was created with Cookiecutter and the `audreyr/cookiecutter-pypackage` project template.
`Cookiecutter`: <https://github.com/audreyr/cookiecutter>
`audreyr/cookiecutter-pypackage`: <https://github.com/audreyr/cookiecutter-pypackage>
# History
## 1.0.0 (2020-07-22)
* Stable release
## 0.2.0 (2020-02-28)
* Better Doc
## 0.1.0 (2020-02-16)
* Configure Travis CI
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/Sergeileduc/py-casim",
"name": "py-casim",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "python casim",
"author": "Sergeileduc",
"author_email": "sergei.leduc@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/65/48/62e1fd8a6541cf32b26542d00b6087e4803ea50df9c0fd2fb9d5acae88b8/py-casim-2.0.3.tar.gz",
"platform": null,
"description": "# Python Casim\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/py-casim.svg)](https://pypi.org/project/py-casim/)\r\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py-casim)\r\n[![Build Status](https://travis-ci.org/Sergeileduc/py-casim.svg?branch=master)](https://travis-ci.org/Sergeileduc/py-casim)\r\n[![Documentation Status](https://readthedocs.org/projects/py-casim/badge/?version=latest)](https://py-casim.readthedocs.io/en/latest/?badge=latest)\r\n[![codecov](https://codecov.io/gh/Sergeileduc/py-casim/branch/master/graph/badge.svg)](https://codecov.io/gh/Sergeileduc/py-casim)\r\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b920474aee1b4a05bfa030606f1e1aef)](https://www.codacy.com/gh/Sergeileduc/py-casim/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Sergeileduc/py-casim&utm_campaign=Badge_Grade)\r\n\r\nPython package and cli to upload image on Casimages.\r\n\r\n## In python project\r\n\r\n```python\r\nfrom py_casim import Casim\r\n\r\nc = Casim(\"my_image.jpg\")\r\n\r\nlink = c.get_link()\r\n\r\nprint(link)\r\n```\r\n\r\nTo resize an image :\r\n\r\n```python\r\nfrom py_casim import Casim\r\n\r\nc = Casim(\"my_image.jpg\", resize=640)\r\n\r\nlink = c.get_link()\r\n\r\nprint(link)\r\n```\r\n\r\nTo get another url/code return :\r\n\r\n```python\r\nfrom py_casim import Casim\r\n\r\nc = Casim(\"my_image.jpg\", resize=640)\r\n\r\nlink = c.get_share_code(3) # return HTML code\r\n```\r\n\r\nSee the doc for details.\r\n\r\n## From command line\r\n\r\n```console\r\nfoo@bar:~$ py-casim my_image.jpg\r\nhttps://nsa40.casimages.com/img/xxxxxxxxxxxxxxx.png\r\n```\r\n\r\nor with options :\r\n\r\n```console\r\nfoo@bar:~$ py-casim --size 640 my_image.jpg\r\nhttps://nsa40.casimages.com/img/xxxxxxxxxxxxxxx.png\r\n```\r\n\r\n* Free software: MIT license\r\n* Documentation: <https://py-casim.readthedocs.io>.\r\n\r\n### Features\r\n\r\n* upload image and get his url\r\n* python package (import) OR command line tool\r\n\r\n## Dev\r\nThere's an alternative to `make` called `invoke` (Makefile equivalent is tasks.py)\r\n`pip install invoke`\r\n\r\n```shell\r\ninv test\r\ninv lint\r\ninv coverage\r\ninv --list\r\n```\r\n\r\n### Credits\r\n\r\nThis package was created with Cookiecutter and the `audreyr/cookiecutter-pypackage` project template.\r\n\r\n`Cookiecutter`: <https://github.com/audreyr/cookiecutter>\r\n\r\n`audreyr/cookiecutter-pypackage`: <https://github.com/audreyr/cookiecutter-pypackage>\r\n\r\n\r\n# History\r\n\r\n## 1.0.0 (2020-07-22)\r\n\r\n* Stable release\r\n\r\n## 0.2.0 (2020-02-28)\r\n\r\n* Better Doc\r\n\r\n## 0.1.0 (2020-02-16)\r\n\r\n* Configure Travis CI\r\n* First release on PyPI.\r\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "Upload image",
"version": "2.0.3",
"split_keywords": [
"python",
"casim"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a6ffc0030714150ab54294aedf963df9",
"sha256": "39ae7f21815e8da54ce348bcec075815cb688677d0757a6dfcf80ebd0dc78fb0"
},
"downloads": -1,
"filename": "py_casim-2.0.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6ffc0030714150ab54294aedf963df9",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 8126,
"upload_time": "2022-12-02T17:42:22",
"upload_time_iso_8601": "2022-12-02T17:42:22.848044Z",
"url": "https://files.pythonhosted.org/packages/8d/a7/6d22dc07519bbc2c8c617125af3c6039182b24e9b474c2245ead84db4e26/py_casim-2.0.3-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "98774d37748d747f933d19edfbabbf92",
"sha256": "a24399530c0d92dcc220559fc414604e3df876458f70fdf950e3c50baed4f227"
},
"downloads": -1,
"filename": "py-casim-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "98774d37748d747f933d19edfbabbf92",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2158662,
"upload_time": "2022-12-02T17:42:24",
"upload_time_iso_8601": "2022-12-02T17:42:24.779174Z",
"url": "https://files.pythonhosted.org/packages/65/48/62e1fd8a6541cf32b26542d00b6087e4803ea50df9c0fd2fb9d5acae88b8/py-casim-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-02 17:42:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Sergeileduc",
"github_project": "py-casim",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "click",
"specs": []
},
{
"name": "click-help-colors",
"specs": []
},
{
"name": "bs4",
"specs": []
},
{
"name": "requests",
"specs": []
}
],
"tox": true,
"lcname": "py-casim"
}