Skip to content

Commit 0469b08

Browse files
author
Jorge A. Gomes
committed
Update README.md to include a couple how-tos
1 parent f0d648b commit 0469b08

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,49 @@ The source in this repo is pretty much outdated and does not reflect the latest
3333

3434
The latest release published here was generated from another project, as mentioned in #45.
3535

36+
## How to install:
37+
38+
From PyPI, in the CLI:
39+
40+
```
41+
$ pip install raylib-py
42+
```
43+
44+
You can also download the wheel from the [releases](https://github.com/overdev/raylib-py/releases) page and install it with pip locally:
45+
46+
```
47+
$ pip install path/to/raylib_py-4.5.0-py3-none-any.whl
48+
```
49+
50+
## How to use:
51+
52+
Try this (after installed raylib-py, create a new python file, save the code below into it, then run it):
53+
54+
```python
55+
56+
from raylibpy import *
57+
58+
59+
def main():
60+
61+
init_window(800, 450, "raylib [core] example - basic window")
62+
63+
set_target_fps(60)
64+
65+
while not window_should_close():
66+
67+
begin_drawing()
68+
clear_background(RAYWHITE)
69+
draw_text("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY)
70+
end_drawing()
71+
72+
close_window()
73+
74+
75+
if __name__ == '__main__':
76+
main()
77+
```
78+
3679
## Features:
3780
- PEP8 naming convention only:
3881

0 commit comments

Comments
 (0)