neptyne.cell
Neptyne's Cell API.
Cell ranges are the fundamental building block of Neptyne. They are the primary way to interact with data in a sheet.
Access to a cell's value is implicitly provided.
Set A1's value
A1 = 4
Retrieve A1's value
A1
Set A1's background color
A1.set_background_color('red')
For more high level context see Cell API Overview
class
CellApiMixin:
def
set_render_size(self, width: int, height: int) -> None:
Change the size of an object anchored in this cell.
For example, if B2 contains an Image, you can change the size of
the image by calling B2.set_render_size(100, 100)
.
def
get_render_size( self) -> tuple[int, int] | list[tuple[int, int]] | list[list[tuple[int, int]]]:
Get the size of an object anchored in this cell.
def
set_color(self: Any, *args: Any) -> None:
Set the text color of the cell
Color may be specified in a variety of formats:
- As three integers representing the red, green, and blue components of the color, e.g.
set_color(255, 0, 0)
- As a list or tuple of three integers, e.g.
set_color([255, 0, 0])
- As a hex color string, e.g.
set_color('#FF0000')
- As a named color e.g.
set_color('red')
def
set_background_color(self: Any, *args: Any) -> None:
Set the background color of the cell
Color may be specified in a variety of formats:
- As three integers representing the red, green, and blue components of the color, e.g.
set_background_color(255, 0, 0)
- As a list or tuple of three integers, e.g.
set_background_color([255, 0, 0])
- As a hex color string, e.g.
set_background_color('#FF0000')
- As a named color e.g.
set_background_color('red')