-
-

Python Bindings for Raylib 4.5

+
+

Python Bindings for Raylib 5.0

New CFFI API static bindings.

  • Automatically generated to be as close as possible to @@ -114,7 +116,7 @@ original Raylib.

  • Full documentation

-

Quickstart

+

Quickstart

pip3 install raylib

from pyray import *
 init_window(800, 450, "Hello")
@@ -128,7 +130,7 @@ close_window()
 
-

Installation

+

Installation

First make sure you have the latest pip installed:

python3 -m pip install --upgrade pip
 
@@ -142,11 +144,11 @@ python3 -m pip install raylib

If yours isn’t available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g. using homebrew, apt, etc.

-

Raspberry Pi

+

Raspberry Pi

Using on Rasperry Pi

-

Dynamic binding version

+

Dynamic binding version

There is now a separate dynamic version of this binding:

python3 -m pip install raylib_dynamic
 
@@ -154,7 +156,7 @@ using homebrew, apt, etc.

It works on some systems where the static version doesn’t, but be sure to read these caveats before using it

-

Beta testing

+

Beta testing

If you find a bug, it may be fixed in the latest dev release. You can install an alpha or beta version by specifying the exact version number like this:

python3 -m pip install raylib==4.2.0.0.dev4
@@ -162,7 +164,7 @@ You can install an alpha or beta version by specifying the exact version number
 
-

Problems?

+

Problems?

If it doesn’t work, try to build manually.. If that works then submit an issue to let us know what you did.

If you need help you can try asking on Discord.

@@ -170,48 +172,48 @@ to let us know what you did.

-

How to use

+

How to use

There are two APIs, you can use either or both:

-

If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API

+

If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API

Use the C API.

-

If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower

+

If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower

Use the Python API.

-

App showcase

+

App showcase

Tanki

Alloy Bloxel Editor

Add your app here!

-

RLZero

+

RLZero

A related library (that is a work in progress!):

A simplified API for Raylib for use in education and to enable beginners to create 3d games

-

Help wanted

+

Help wanted

  • Converting more examples from C to Python

  • Testing on more platforms

-

License (updated)

+

License (updated)

The bindings are now under the Eclipse Public License, so you are free to statically link and use in non-free / proprietary / commercial projects!

-

Performance

+

Performance

For fastest performance use Pypy rather than standard Python.

Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating in your update loop and then only convert them to C data structures when you have to call the C functions for drawing.

-

Bunnymark

+

Bunnymark

@@ -251,7 +253,7 @@ and then only convert them to C data structures when you have to call the C func
-

Packaging your app

+

Packaging your app

You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:

pip3 install nuitka
 cd examples/textures
@@ -260,7 +262,7 @@ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png text
 

Library

- - -
-

B

-
- -

C

- - - @@ -687,6 +162,8 @@
  • (in module raylib)
  • + + - -
    - -

    E

    - - - -
    - -

    F

    - - - @@ -1317,694 +182,6 @@

    G

    - + -
    - -

    H

    - - - -
    - -

    I

    - - - -
    - -

    K

    - - - @@ -4975,260 +208,18 @@

    L

    + - @@ -5249,234 +240,8 @@
  • (in module raylib)
  • -
  • Material (class in pyray) - -
  • -
  • MATERIAL_MAP_ALBEDO (in module raylib) - -
  • -
  • MATERIAL_MAP_BRDF (in module raylib) - -
  • -
  • MATERIAL_MAP_CUBEMAP (in module raylib) - -
  • -
  • MATERIAL_MAP_EMISSION (in module raylib) - -
  • -
  • MATERIAL_MAP_HEIGHT (in module raylib) - -
  • -
  • MATERIAL_MAP_IRRADIANCE (in module raylib) - -
  • -
  • MATERIAL_MAP_METALNESS (in module raylib) - -
  • -
  • MATERIAL_MAP_NORMAL (in module raylib) - -
  • -
  • MATERIAL_MAP_OCCLUSION (in module raylib) - -
  • -
  • MATERIAL_MAP_PREFILTER (in module raylib) - -
  • -
  • MATERIAL_MAP_ROUGHNESS (in module raylib) - -
  • -
  • MaterialMap (class in pyray) - -
  • -
  • MaterialMapIndex (class in pyray) - -
  • -
  • Matrix (class in pyray) - -
  • -
  • Matrix2x2 (class in pyray) - -
  • -
  • matrix_add() (in module pyray) -
  • -
  • matrix_determinant() (in module pyray) -
  • -
  • matrix_frustum() (in module pyray) -
  • -
  • matrix_identity() (in module pyray) -
  • -
  • matrix_invert() (in module pyray) -
  • -
  • matrix_look_at() (in module pyray) -
  • -
  • matrix_multiply() (in module pyray) -
  • -
  • matrix_ortho() (in module pyray) -
  • -
  • matrix_perspective() (in module pyray) -
  • -
  • matrix_rotate() (in module pyray) -
  • -
  • matrix_rotate_x() (in module pyray) -
  • -
  • matrix_rotate_xyz() (in module pyray) -
  • -
  • matrix_rotate_y() (in module pyray) -
  • -
  • matrix_rotate_z() (in module pyray) -
  • -
  • matrix_rotate_zyx() (in module pyray) -
  • -
  • matrix_scale() (in module pyray) -
  • -
  • matrix_subtract() (in module pyray) -
  • -
  • matrix_to_float_v() (in module pyray) -
  • -
  • matrix_trace() (in module pyray) -
  • -
  • matrix_translate() (in module pyray) -
  • -
  • matrix_transpose() (in module pyray) -
  • -
  • MatrixAdd() (in module raylib) -
  • -
  • MatrixDeterminant() (in module raylib) -
  • -
  • MatrixFrustum() (in module raylib) -
  • -
  • MatrixIdentity() (in module raylib) -
  • -
  • MatrixInvert() (in module raylib) -
  • -
  • MatrixLookAt() (in module raylib) -
  • -
  • MatrixMultiply() (in module raylib) -
  • -
  • MatrixOrtho() (in module raylib) -
  • -
  • MatrixPerspective() (in module raylib) -
  • -
  • MatrixRotate() (in module raylib) -
  • -
  • MatrixRotateX() (in module raylib) -
  • -
  • MatrixRotateXYZ() (in module raylib) -
  • -
  • MatrixRotateY() (in module raylib) -
  • -
  • MatrixRotateZ() (in module raylib) -
  • -
    -
  • MOUSE_BUTTON_BACK (in module raylib) - -
  • -
  • MOUSE_BUTTON_EXTRA (in module raylib) - -
  • -
  • MOUSE_BUTTON_FORWARD (in module raylib) - -
  • -
  • MOUSE_BUTTON_LEFT (in module raylib) - -
  • -
  • MOUSE_BUTTON_MIDDLE (in module raylib) - -
  • -
  • MOUSE_BUTTON_RIGHT (in module raylib) - -
  • -
  • MOUSE_BUTTON_SIDE (in module raylib) - -
  • -
  • MOUSE_CURSOR_ARROW (in module raylib) - -
  • -
  • MOUSE_CURSOR_CROSSHAIR (in module raylib) - -
  • -
  • MOUSE_CURSOR_DEFAULT (in module raylib) - -
  • -
  • MOUSE_CURSOR_IBEAM (in module raylib) - -
  • -
  • MOUSE_CURSOR_NOT_ALLOWED (in module raylib) - -
  • -
  • MOUSE_CURSOR_POINTING_HAND (in module raylib) - -
  • -
  • MOUSE_CURSOR_RESIZE_ALL (in module raylib) - -
  • -
  • MOUSE_CURSOR_RESIZE_EW (in module raylib) - -
  • -
  • MOUSE_CURSOR_RESIZE_NESW (in module raylib) - -
  • -
  • MOUSE_CURSOR_RESIZE_NS (in module raylib) - -
  • -
  • MOUSE_CURSOR_RESIZE_NWSE (in module raylib) - -
  • -
  • MouseButton (class in pyray) - -
  • -
  • MouseCursor (class in pyray) - -
  • -
  • Music (class in pyray) - -
  • -
    - -

    N

    - - - @@ -5659,12 +256,6 @@

    O

    -
    • ORANGE (in module pyray) @@ -5678,228 +269,10 @@

      P

      - +
      +
      • pyray @@ -5918,131 +293,9 @@
      -

      Q

      - - - -
      -

      R

      + -
      -
    • Rectangle (class in pyray) - -
    • +

      S

      - -
      - -

      T

      - - - -
      - -

      U

      - - -

      V

      - @@ -8318,44 +347,12 @@

      W

      -
      diff --git a/docs/index.html b/docs/index.html index bd70efc..d713af7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,26 +1,28 @@ - + - + Raylib Python — Raylib Python documentation - - - + + + + + - - - - - + + + + + - + @@ -44,7 +46,7 @@