Skip to content

Small demo showing how to use cython in a python project.

License

Notifications You must be signed in to change notification settings

jean-turgeon/cython-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cython-demo

Description

This is a small proof of concept on how to use cython within a python project. The cython file (pyx) contain one function calculating the fibonacci sequence. The main file import the compiled library and use the function.

Repository content

.
├── LICENSE
├── main.py
├── README.md
├── setup.py
└── src
    └── fibonacci.pyx

Compile and run

Dependencies needed are setuptools and cython

Compile

python3 ./setup.py build_ext --inplace

Run

python3 ./main.py

Expected output

1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597

About

Small demo showing how to use cython in a python project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published