Metadata-Version: 2.4
Name: pycersi
Version: 7.1.5
Summary: PyCersi is a lightweight Python library for number-related utilities. It offers mathematical functions, checkers, and stack operations, simplifying common tasks.
Home-page: https://github.com/subhrachakraborti/PyCersi
Author: Subhra Chakraborti
Author-email: Subhra Chakraborti <mail@subhrachakraborti.com>
Maintainer-email: Subhra Chakraborti <subhra@linuxmail.org>
License: MIT
Project-URL: Homepage, https://subhra.is-a.dev/projects/PyCersi
Project-URL: Blog, https://blog.subhrachakraborti.com/p/info-on-pycersi.html
Project-URL: Try Online, https://new.subhrachakraborti.com/productivity/python
Project-URL: Repository, https://github.com/subhrachakraborti/PyCersi
Project-URL: Issues, https://github.com/subhrachakraborti/PyCersi/issues
Keywords: pycersi,math,number-theory,utilities,education
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.33.1
Requires-Dist: numpy>=1.26.0
Requires-Dist: scipy>=1.11.0
Requires-Dist: matplotlib>=3.8.0
Requires-Dist: pillow>=10.0.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# PyCersi

![Python Versions](https://img.shields.io/pypi/pyversions/pycersi?color=FF8C00&style=for-the-badge)
![PyPI - Version](https://img.shields.io/pypi/v/PyCersi?style=for-the-badge&color=FFD700)
![License](https://img.shields.io/badge/License-MIT-green.svg?color=008080&style=for-the-badge)
![GitHub Release](https://img.shields.io/github/v/release/subhrachakraborti/pycersi?sort=date&display_name=release&style=for-the-badge)

![PyCersi](pycersi/public/intro.gif)

> **DEVELOPED BY:** SUBHRA CHAKRABORTI  
> **LAST UPDATE:** 21 August 2026  
> **VERSION:** 7.1.5

---

## Table of Contents

- [Overview](#overview)
- [Features](#features)
- [Installation](#installation)
- [Quick Start & Usage](#quick-start--usage)
- [Browser-Based Web GUI](#browser-based-web-gui)
- [Running Tests](#running-tests)
- [Contributing](#contributing)
- [License](#license)
- [Security & Safety](#security--safety)
- [Contact](#contact)
- [Acknowledgments](#acknowledgments)

---

## Overview

**PyCersi** is a comprehensive, lightweight Python library designed to streamline number theory, mathematical constants, scientific utilities, stack operations, data security (Privator), and AI-driven calculations into a simple, unified interface.

It is easy to use, highly efficient, and easily integrates into any Python application—from quick scripts to complex scientific workflows.

---

## Features

PyCersi offers a wide range of number-related utilities and mathematical modules:

- **Mathematical Constants**

  - `Euler's Constant (e)`
  - `Golden Ratio (GR)`
  - `Logarithm of e (loge)`
  - `Pi (pi)`

- **Physical Constants**

  - `Astronomical Unit (AU)`
  - `Electric Permitivity (Eo)`
  - `Elementary Charge (Q)`
  - `Fine Structure Constant (fsc)`
  - `Gravitational Constant (G)`
  - `Light Year (LY)`
  - `Magnetic Permeability (Muo)`
  - `Mass of Earth (ME)`
  - `Mass of Electron (me)`
  - `Mass of Neutron (mn)`
  - `Mass of Proton (mp)`
  - `Mass of Sun (MS)`
  - `Planck's Constant (h)`
  - `Parsec (PC)`
  - `Reduced Plank Constant (hbar)`
  - `Speed of Light (c)`

- **Additional Constants**

  - `Avogadro's Number (NA)`
  - `Boltzmann Constant (BK)`
  - `Chandrashekhar Limit (CSK)`
  - `Faraday's Constant (F)`
  - `Gas Constant (R)`
  - `Hubble's Constant (H)`
  - `Stefan-Boltzmann Constant (SBK)`

- **Searchers**

  - `Fibonacci Upto Program : fiboupto`
  - `Fibonacci Range Program : fiborange`
  - `Floyd Triangle Program`
  - `Greatest Common Divisor Program`
  - `Least Common Multiple Program`

- **Number Property Checkers**

  - `Abundant Number Checker`
  - `Armstrong Number Checker`
  - `Automorphic Number Checker`
  - `Buzz Number Checker`
  - `Circular Prime Number Checker`
  - `Curzon Number Checker`
  - `Composite Number Checker`
  - `CoPrime Number Checker`
  - `Disarium Number Checker`
  - `Dudeney Number Checker`
  - `Duck Number Checker`
  - `Even Number Checker`
  - `Fibonacci Number Checker`
  - `Happy Number Checker`
  - `Harshad Number Checker`
  - `Heteromecic Number Checker`
  - `Krishnamurthy Number Checker`
  - `Magic Number Checker`
  - `Neon Number Checker`
  - `Niven Number Checker`
  - `Oblong Number Checker`
  - `Odd Number Checker`
  - `Palindrome Number Checker`
  - `Perfect Number Checker`
  - `Prime Number Checker`
  - `Pronic Number Checker`
  - `Sunny Number Checker`
  - `Special Number Checker`
  - `Spy Number Checker`
  - `Twin Prime Number Checker`
  - `Twisted Prime Checker`
  - `Unique Number Checker`
  - `Tech Number Checker`
  - `Ugly Number Checker`

- **Mathematical Functions**

  - `Area of Circle : ar_circle`
  - `Area of Rectangle : ar_rect`
  - `Area of Triangle : ar_triangle`
  - `Combination Calculator : comb`
  - `Digit to Word Converter : digiwords`
  - `Factorial Calculator : fact`
  - `Factors Calculator : factor`
  - `Permutation Calculator : perm`

- **Stack Functions**

  - `Push Into Stack : s_push`
   - `Pop Out Of Stack : s_pop`
  - `Size Of Stack : s_size`
   - `Underflow Stack Checker : s_Empty`
  - `Top Of Stack : s_top`
  - `Display Stack : s_display`

- **PyCersi Privator**

   - `Desktop mode (Tkinter): privator()`
   - `Browser mode: privator_browser()`
   - `Data Encryptor`
   - `Data Decryptor`

- **PyCersi AI BOT _(Requests module is required)_**

   - `CLI Mode`
   - `Tkinter Mode`
   - `Browser Mode`
   - `PyCersi AI Bot: bot()`

- **Scientific Computation Additions**

   - `Unit conversion: convert_units()`
   - `Dimensional analysis: dimensional_analysis()`
   - `Linear solver: solve_linear()`
   - `Quadratic solver: solve_quadratic()`
   - `Polynomial solver up to degree 5: solve()`
   - `Chinese Remainder Theorem solver: crm()`
   - `Symbolic derivative (basic polynomial): symbolic_derivative()`
   - `Statistics report: statistics()`

- **Equation Plotting (NumPy + SciPy + Matplotlib)**

   - `Plot equations with left/right side comparison: plot()`
   - `Automatic intersection detection inside plotting range`
   - `Optional image export with save_path`

- **Number Intelligence API**

   - `analyze_number()`
   - `analyze()`
   - `Text, dict, and JSON report modes`

These functions are designed to help you perform common number-related operations efficiently and can be easily integrated into larger projects.

---

## Installation

PyCersi is available on PyPI and can be installed using `pip` on various platforms including Windows, macOS, and Linux.
PyCersi can also be installed in an automatic process for **Windows** using a .bat file. [Click here](https://subhrachakraborti.com/app)

### Windows

1. **Install Python**: Make sure Python is installed on your system. You can download it from the official [Python website](https://www.python.org/downloads/).
2. **Open Command Prompt**: Press `Win + R`, type `cmd`, and hit Enter.
3. **Run the pip command**:

```bash
pip install pycersi
```

### macOS

1. **Install Python**: Ensure Python is installed. You can use Homebrew to install it:

```bash
brew install python
```

2. **Open Terminal**: You can find Terminal in Applications > Utilities.

```bash
pip3 install pycersi
```

### Linux (Ubuntu/Debian-based)

1. **Update Packages**:

```bash
sudo apt update
```

2. **Install Python and pip**:

```bash
sudo apt install python3 python3-pip
```

3. **Run the pip command**:

```bash
pip3 install pycersi
```

---

## Using The Functions

1. For using any _searchers_ functions from PyCersi module, use:
   `pycersi.<name>(limit)`.

   - Example: `pycersi.fiboupto(limit)`

2. For using any _checker_ functions from PyCersi module, use:
   `pycersi.is<name>(value)`.

   - Example: `pycersi.issunny(value)`

3. For using any _mathematical_ function from PyCersi module, use:
   `pycersi.<name>(value)`.

   - Example: `pycersi.fact(value)`

4. For using any _stack_ function from PyCersi module, use:
   `pycersi.s_<name>(stack,[element])`.

   - Example: `pycersi.s_top(book_stack)`

5. For using _Pycersi Privator_, use:
   `pycersi.privator()`.

   - Example: `pycersi.privator()`

6. For using _Pycersi Bot_, use:
   `pycersi.bot()`.

   - Example: `pycersi.bot()`
   - Bot asks for your OpenRouter API key at runtime.

7. For using _PyCersi Privator Browser Mode_, use:
   `pycersi.privator_browser()`.

   - Example: `pycersi.privator_browser()`

8. For number intelligence report, use:
   `pycersi.analyze(number)`.

   - Example: `pycersi.analyze(153)`
   - JSON output: `pycersi.analyze(153, output="json")`

9. For scientific conversions and equation helpers, use:
   `pycersi.convert_units(value, from_unit, to_unit)`
   `pycersi.solve_linear(a, b)`
   `pycersi.solve_quadratic(a, b, c)`

   - Example: `pycersi.convert_units(1, "au", "km")`
   - Example: `pycersi.solve_quadratic(1, -3, 2)`

10. For dimension checks, symbolic derivative, and stats, use:
   `pycersi.dimensional_analysis(numerator_units, denominator_units)`
   `pycersi.symbolic_derivative(expression)`
   `pycersi.statistics(data)`

   - Example: `pycersi.dimensional_analysis(["m", "m"], ["s", "s"])`
   - Example: `pycersi.symbolic_derivative("3x^3-2x+7")`
   - Example: `pycersi.statistics([1,2,3,4,5])`

11. For polynomial equations (up to power 5), use:
   `pycersi.solve(equation=..., output="dict")`

   - Example: `pycersi.solve(equation="x^4 - x^2 + x = 7")`
   - Example: `pycersi.solve(coefficients=[1, 0, -1, 1, -7], output="json")`

12. For Chinese Remainder Theorem, use:
   `pycersi.crm(remainders, moduli)`

   - Example: `pycersi.crm([2, 3, 2], [3, 5, 7])`

13. For plotting equations with NumPy/SciPy/Matplotlib, use:
   `pycersi.plot(equation, x_min, x_max)`

   - Example: `pycersi.plot("x^4 - x^2 + x = 7", x_min=-4, x_max=4)`
   - Example: `pycersi.plot("sin(x) = x/2", x_min=-10, x_max=10, save_path="plot.png")`

14. To launch the interactive Browser Web GUI:
   `pycersi.gui()`

   - Example: `import pycersi as p; p.gui()`

---

## Browser-Based Web GUI

PyCersi features a modern, single-page Web GUI built with a dark glassmorphism design system. It exposes 60+ mathematical functions, interactive data structures, unit converters, calculus plotters, Privator encryption suite, and the PyCersi AI Assistant.

### Launching the Web GUI

**From Python REPL / Script:**
```python
import pycersi as p

p.gui()
```

**From Terminal:**
```bash
python -m pycersi.gui
```

### Interface Screenshots

![PyCersi Web GUI Screenshot 1](pycersi/public/gui-1.jpg)

![PyCersi Web GUI Screenshot 2](pycersi/public/gui-2.jpg)

---

## Running Tests

Run the comprehensive unit test suite from the project root:

```bash
python test.py
```
---

## Contributing

Contributions are warmly welcomed! Follow these steps to submit your enhancements:

1. **Fork the repository**:

   - Click the "Fork" button at the top right of the repository page to create a copy of the repository on your GitHub account.

2. **Create a new branch**:

   - Clone your forked repository to your local machine.
   - Create a new branch for your feature or bug fix:
   ```bash
     git checkout -b feature-branch
   ```

3. **Make your changes**:

   - Make sure your changes follow the project's coding standards.
   - Once you're satisfied with your changes, commit them:
   ```bash
     git commit -m 'Add some feature'
   ```

4. **Push your changes**:

   - Push your changes to your forked repository:
   ```bash
     git push origin feature-branch
   ```

5. **Create a pull request**:
   - Open a pull request from your feature branch in your forked repository to the main branch in the original repository.
   - Please ensure that your code includes relevant tests and follows the project's guidelines.

### Guidelines:

- **Code Style**: Ensure your code follows the project's coding style and is well-structured.
- **Testing**: Make sure that your code is tested and includes appropriate unit tests.
- **Documentation**: Update documentation if necessary for any changes or new features.
- **Pull Request Review**: Be patient as maintainers review your pull request and possibly request changes.

Thank you for contributing to PyCersi! Your help is appreciated.

---

## License

Distributed under the MIT License. See [LICENSE](https://github.com/subhrachakraborti/PyCersi/blob/main/LICENSE) for details.

---

## Security & Safety

This project is built with care and attention to detail to simplify daily computations and ensure zero security vulnerabilities or runtime safety exceptions.

I am deeply committed to making the web a safer, better place. PyCersi is strictly non-malicious.

| Audit Service | Status & Report |
| --- | --- |
| **SafetyCLI** | [Check Security Report](https://data.safetycli.com/packages/pypi/pycersi/) |
| **Get Safety** | [Check Safety Details](https://getsafety.com/packages/pypi/pycersi) |

---

## Contact

Subhra Chakraborti - [mail@subhrachakraborti.com](mailto:mail@subhrachakraborti.com)

Project Link: [https://github.com/subhrachakraborti/PyCersi](https://github.com/subhrachakraborti/PyCersi)

---

## Acknowledgments

- [Python.org](https://www.python.org/)
- [OpenRouter](https://openrouter.ai/)
- **Core Libraries**:
  - Math Library
  - NumPy
  - SciPy
  - Matplotlib
  - TTK Bootstrap
  - Requests
  - Tkinter
