Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 2.46 KB

CONTRIBUTING.md

File metadata and controls

40 lines (33 loc) · 2.46 KB

Contributing

Anyone can contribute, be it by coding, improving docs or just proposing a new feature. As a new contributor, you may want to have a look at some of the following issues:

When picking up an existing issue, please let others know in the issue comment. Don't hesitate to reach out for guidance or to discuss a solution proposal!

Code contributions

When creating a Pull Request for code changes, please check that you cover the following:

  • Include tests for the changes you introduce. See the tests folder for examples.
  • Formatted the code according to PEP-8

Basic technical approach

ObjectBox offers a C API which can be integrated into python using ctypes. The C API is is also used by the ObjectBox language bindings for Go, Swift, and Dart/Flutter. These language bindings currently serve as an example for this Python implementation. Internally, ObjectBox uses FlatBuffers to store objects.

The main prerequisite to using the Python APIs is the ObjectBox binary library (.so, .dylib, .dll depending on your platform) which actually implements the database functionality. The library should be placed in the objectbox/lib/[architecture]/ folder of the checked out repository. You can get/update it by running make depend.

Getting started as a contributor

Initial setup

If you're just getting started, run the following simple steps to set up the repository on your machine

  • clone this repository
  • make depend to initialize virtualenv and get dependencies (objectbox-c shared library)
  • make to build and test

You can also run make help to see all available options.

Regular development workflow

You'll probably use the following commands regularly when implementing a new feature in the library:

  • make test to make sure everything works as expected after your changes
  • make benchmark to measure the CRUD performance on your machine - if you're working on a performance-related change