PHPackages                             digitalbitlabs/simple-pi - 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

ActiveProject[Framework](/categories/framework)

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

Simple Pi is REST API framework developed in PHP

v1.1.0(4y ago)018MITPHPPHP &gt;7.0

Since Jul 29Pushed 4y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

[![](https://user-images.githubusercontent.com/72734777/127652035-fbd7bbad-efa5-4fc3-8118-f6995216e11f.png)](https://user-images.githubusercontent.com/72734777/127652035-fbd7bbad-efa5-4fc3-8118-f6995216e11f.png)

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 create-project 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 PHP PDO objects to run database queries. Following drivers are supported as per the php.net documentation.

- CUBRID (PDO)
- MS SQL Server (PDO)
- Firebird (PDO)
- IBM (PDO)
- Informix (PDO)
- MySQL (PDO)
- MS SQL Server (PDO)
- Oracle (PDO)
- ODBC and DB2 (PDO)
- PostgreSQL (PDO)
- SQLite (PDO)

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

`use SimplePi\Framework\DB;`

Then run the query and fetch results using DB::query()-&gt;result() function.

`DB::query("SELECT * FROM foo")->result();`

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

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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~64 days

Total

5

Last Release

1495d ago

### 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 (45 commits)")

---

Tags

REST APImicro-frameworksimple framework

### Embed Badge

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

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

###  Alternatives

[mnapoli/silly

Silly CLI micro-framework based on Symfony Console

93110.5M128](/packages/mnapoli-silly)[chubbyphp/chubbyphp-framework

A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.

13544.4k4](/packages/chubbyphp-chubbyphp-framework)[viames/pair

lightweight PHP framework as the air

103.0k1](/packages/viames-pair)

PHPackages © 2026

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