Skip to content

Simple lib / cli command to upload image to hosting service and get url (or BBcode, etc...) back.

License

Notifications You must be signed in to change notification settings

Sergeileduc/py-casim

Repository files navigation

Python Casim

PyPI PyPI - Python Version Python package Documentation Status codecov Codacy Badge

Python package and cli to upload image on Casimages.

In python project

from py_casim import Casim

c = Casim("my_image.jpg")

link = c.get_link()

print(link)

To resize an image :

from py_casim import Casim

c = Casim("my_image.jpg", resize=640)

link = c.get_link()

print(link)

To get another url/code return :

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

foo@bar:~$ py-casim my_image.jpg
https://nsa40.casimages.com/img/xxxxxxxxxxxxxxx.png

or with options :

foo@bar:~$ py-casim --size 640 my_image.jpg
https://nsa40.casimages.com/img/xxxxxxxxxxxxxxx.png

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

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

About

Simple lib / cli command to upload image to hosting service and get url (or BBcode, etc...) back.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages