Calango Project
It looks like magic
Get started
Calango 2.3.0 requires Python 3.11 or newer and Cereja 2.3.0 or newer.
Install with pip
pip install "calango>=2.3.0"
or
python -m pip install "calango>=2.3.0"
If these versions are not yet available on PyPI, use the development installation. Release preparation is described in the release guide.
Screen recorder (Windows)
Calango provides a Tkinter recorder for Windows 10/11: choose a monitor, region, or window and save silent MP4 video at 15 or 30 FPS. Window capture works in the background without capturing covering windows; monitor/region capture can include the cursor. The GUI is launched explicitly and is never opened by importing the package.
calango-recorder
python -m calango.gui
The recorder is introduced in Calango 2.3.0. Its package dependency on
cereja>=2.3.0 supplies the native ScreenCapture API, including background
window capture. See installation, API and validation.
Capture stays in Cereja (standard-library Win32); recording and encoding stay in Calango. The Windows recorder does not require MSS, PyAutoGUI or an external FFmpeg executable.
Mouse Interface
from calango.devices import Mouse
mouse = Mouse()
mouse.up() # move mouse pointer [up, down, left, right, top_left, top_right ...
mouse.position = (10, 10) # move mouse pointer to (x, y)
print(mouse.position) # return current postion
Image API
Image reading
from calango import Image
image = Image(image_or_path='image.png')
image[:50, :50].plot() # plot image cropped (0:50, 0:50)
image.right.top.plot() # get image cropped at right top corner
image.draw_text('Hello World!', pos='left_bottom') # draw text on image
image.height # return image height
image.width # return image width
image.center_position # return image center position
image.crop_by_center((20, 20)) # crop image by center
image.prune() # resize image to square size by min(width, height)
# ... and more
Video API
Video Writer
from calango import VideoWriter
import numpy as np
frames = [np.zeros((100, 100, 3), dtype=np.uint8) for _ in range(10)]
with VideoWriter('test.mp4', fps=10) as writer:
for frame in frames:
writer.add_frame(frame)
# OR INLINE
VideoWriter.write_frames('test.mp4', frames) # on end is closed automatically
Video from Camera
from calango import Video
cam = Video(0) # 0 is the default camera
cam.show() # is running in a new thread
cam.total_frames # return the total number of frames
cam.fps # return the frames per second
cam.is_opened # return True if the camera is opened
# ... and more
Video from File
from calango import Video
cam = Video('./video.mp4')
cam.show()
Video from frames directory
from calango import Video
cam = Video('./video/', fps=24)
cam.show()
Video from sequence of images
from calango import Video
images = ['./video/img1.jpg', './video/img2.jpg', './video/img3.jpg'] # or list of images
cam = Video(images, fps=10)
cam.show()
Metadata
Release files for calango 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| calango-2.3.0.tar.gz | 46.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| calango-2.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.8 kB
Release files / calango-2.3.0.tar.gz
| Download URL | calango-2.3.0.tar.gz |
|---|---|
| Size | 46.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e694fdbecbc46dc8d90f1fb592c6b3d147ef065b2fe38e7d9b414730dcaa11be
|
|
BLAKE2b-256 checksum How to use checksums |
10b00de288448e1409139e19b8e2848656b1b5df9be1b6f0f389d12055fcfa29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / calango-2.3.0-py3-none-any.whl
| Download URL | calango-2.3.0-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
257e33a3fe96a949bba7d71d60155bcd46f4fa88ace721d01cf554821f705629
|
|
BLAKE2b-256 checksum How to use checksums |
e9732f037778782614984261d1f0acc6ece26e3ed9a75353c8702eadd60f2b92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|