PHPackages                             digitalbitlabs/simple-pi-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. digitalbitlabs/simple-pi-framework

ActiveLibrary[Framework](/categories/framework)

digitalbitlabs/simple-pi-framework
==================================

Simple Pi is REST API framework developed in PHP

v2.0.1(4y ago)0681MITPHPPHP &gt;7.0

Since Jul 29Pushed 4y agoCompare

[ Source](https://github.com/digitalbitlabs/simple-pi-framework)[ Packagist](https://packagist.org/packages/digitalbitlabs/simple-pi-framework)[ RSS](/packages/digitalbitlabs-simple-pi-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (13)Used By (1)

[![](https://user-images.githubusercontent.com/72734777/127652853-7592fc23-95d0-4dc7-9a07-ddeeaf85f3d9.png)](https://user-images.githubusercontent.com/72734777/127652853-7592fc23-95d0-4dc7-9a07-ddeeaf85f3d9.png)

> This repository contains the source code of Simple Pi framework. To create a project or app using the framework visit

Simple Pi
=========

[](#simple-pi)

Simple Pi is a REST API micro framework developed in PHP. The sole purpose of this framework is give you ready to use simple API which allows you to have custom configuration, routes and database operations. To begin with using the framework, follow the steps given below:

Installation
------------

[](#installation)

To install Simple Pi, you need to have composer installed. If you don't grab it from

`composer require digitalbitlabs/simple-pi my-app`

This will create a directory `my-app` in your current folder with all the code necessary to run the API.

Setup env file
--------------

[](#setup-env-file)

Enter `my-app` folder and rename the `.env.example file` to `.env`

Configure database and application
----------------------------------

[](#configure-database-and-application)

Customise the configuration parameters in `.env` file accordingly. You can also update the settings in `config.php` file placed inside `app` folder in the root directory of your application.

Setup application routes
------------------------

[](#setup-application-routes)

Change or add app routes through `routes.php` file inside app folder in the root directory of your application.

Run the application
-------------------

[](#run-the-application)

To run the app you just created run the following in your terminal from the root folder of your app.

`php -S localhost:8000 -t public\`

Controllers
-----------

[](#controllers)

Controllers are custom classes to group similar operations together. They can be created inside `app\controllers` classes. A Demo controller is already present in the repository code.

Database operations
-------------------

[](#database-operations)

Simple Pi uses Capsule Manager by Laravel for carrying out database operations. For more information visit .

As per the official documentation from Laravel following drivers are supported by Capsule Manager.

- MariaDB 10.2+
- MySQL 5.7+
- PostgreSQL 10.0+
- SQLite 3.8.8+
- SQL Server 2017+

To perform a query to select data simply add the lines at the top of your controller or routes.php file

`use SimplePi\Framework\DB;`

Then to fetch the records from any table simply use the ORM functions provided by Laravel. Visit  for more information. For example the query `SELECT * FROM demo` can be run in the following manner in Simple Pi,

`DB::table('demo')->get()->toArray();`

That's it. You get an array of data in your database table.

> *To perform additional operations like delete or update or insert, use the respective functions from `CapsuleManager` class. The functions can be executed in a similar fashion as Laravel eloquent. You can refer to Laravel eloquent documentation for more details.*

Credits
-------

[](#credits)

This framework is developed by [Sanket Raut](https://twitter.com/sanketmraut) as a hobby project at [Digitalbit Labs](https://digitalbit.in) to write a bare metal framework that can be kept as simple as possible.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~45 days

Total

12

Last Release

1480d ago

Major Versions

v1.1.1 → v2.02022-04-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d4de3416b364d87f25baadbd1fc098628f3395cd1377a9f573f5eb41708e5ae?d=identicon)[digitalbitlabs](/maintainers/digitalbitlabs)

---

Top Contributors

[![sanketraut](https://avatars.githubusercontent.com/u/7948018?v=4)](https://github.com/sanketraut "sanketraut (32 commits)")

---

Tags

REST APImicro-frameworksimple framework

### Embed Badge

![Health badge](/badges/digitalbitlabs-simple-pi-framework/health.svg)

```
[![Health](https://phpackages.com/badges/digitalbitlabs-simple-pi-framework/health.svg)](https://phpackages.com/packages/digitalbitlabs-simple-pi-framework)
```

###  Alternatives

[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
