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4.22
3.4.21
3.4.20
3.4.2
3.4.19
3.4.18
3.4.17
3.4.16
3.4.15
3.4.13
3.4.12
3.4.11
3.4.10
3.4.1
3.4.0
3.3.9
3.3.8
3.3.7
3.3.6
3.3.5
3.3.4
3.3.20
3.3.2
3.3.19
3.3.18
3.3.17
3.3.16
3.3.15
3.3.14
3.3.13
3.3.12
3.3.11
3.3.10
3.3.1
3.3.0
3.2.5
3.2.4
3.2.3
3.2.2
3.2.1
3.2.0
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.3
3.1.2
3.1.10
3.1.1
3.1
3.0
2.9.9
2.9.8
2.9.7
2.9.6
2.9.5
2.9.4
2.9.3
2.9.2
2.9.18
2.9.17
2.9.16
2.9.15
2.9.14
2.9.13
2.9.12
2.9.11
2.9.10
2.9.1
2.9.0
2.8.2
2.8.1
2.8.0
2.7.2
2.7.1
2.7.0
2.6.0
2.5.4
2.5.3
2.5.2
2.5.1
2.5
2.4.9
2.4.8
2.4.7
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.12
2.4.11
2.4.10
2.4.1
2.4.0
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.6
2.0.5
2.0.4
2.0.3
2.0.1
2.0.0
1.6.0
1.5.3
1.5.2
1.5.1
1.5.0
1.3.0
1.2.9
1.2.8
1.2.7
1.2.2
1.2.1
1.2.0
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
توضیحات
Professional C++ Python bindings with type-generic templates, pystubs and native threading
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | IncludeCPP-4.9.9 |
| نام | IncludeCPP |
| نسخه کتابخانه | 4.9.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Lilias Hatterscheidt |
| ایمیل نویسنده | Lilias Hatterscheidt <hatterscheidt.lilias@gmail.com> |
| آدرس صفحه اصلی | https://github.com/liliassg/IncludeCPP |
| آدرس اینترنتی | https://pypi.org/project/IncludeCPP/ |
| مجوز | MIT |
# IncludeCPP
Use C++ code in Python. Write your C++ functions and classes, IncludeCPP generates the Python bindings automatically.
```bash
pip install IncludeCPP
```
## Quick Start
### 1. Create a Project
```bash
mkdir myproject && cd myproject
includecpp init
```
This creates:
- `cpp.proj` - your project settings
- `include/` - put your C++ files here
- `plugins/` - binding files go here (auto-generated)
### 2. Write Some C++
Create `include/math.cpp`:
```cpp
namespace includecpp {
int add(int a, int b) {
return a + b;
}
int multiply(int a, int b) {
return a * b;
}
}
```
Your code must be inside `namespace includecpp`. Everything outside is ignored.
### 3. Generate Bindings
```bash
includecpp plugin math include/math.cpp
```
This scans your C++ and creates `plugins/math.cp` with the binding instructions.
### 4. Build
```bash
includecpp rebuild
```
Compiles your C++ into a Python module.
### 5. Use in Python
```python
from includecpp import math
print(math.add(2, 3)) # 5
print(math.multiply(4, 5)) # 20
```
Done. Your C++ code works in Python.
---
## Classes
C++ classes work the same way:
```cpp
// include/calculator.cpp
#include <vector>
namespace includecpp {
class Calculator {
public:
Calculator() : result(0) {}
void add(int x) { result += x; }
void subtract(int x) { result -= x; }
int getResult() { return result; }
void reset() { result = 0; }
private:
int result;
};
}
```
Generate and build:
```bash
includecpp plugin calculator include/calculator.cpp
includecpp rebuild
```
Use in Python:
```python
from includecpp import calculator
calc = calculator.Calculator()
calc.add(10)
calc.add(5)
calc.subtract(3)
print(calc.getResult()) # 12
```
---
## Development Workflow
When you're actively working on your C++:
```bash
# Regenerate bindings AND rebuild in one command
includecpp auto math
# Fast rebuild (skips unchanged files, ~0.4s when nothing changed)
includecpp rebuild --fast
# Rebuild everything from scratch
includecpp rebuild --clean
```
---
## CLI Commands
| Command | What it does |
|---------|-------------|
| `init` | Create project structure |
| `plugin <name> <file.cpp>` | Generate bindings from C++ |
| `auto <name>` | Regenerate bindings + rebuild |
| `rebuild` | Compile all modules |
| `rebuild --fast` | Fast incremental build |
| `rebuild --clean` | Full clean rebuild |
| `get <name>` | Show module's API |
| `server start` | Start HomeServer |
| `server stop` | Stop HomeServer |
| `server upload` | Upload file/project |
| `server download` | Download file/project |
| `server list` | List stored items |
---
## Project Configuration
The `cpp.proj` file controls your build:
```json
{
"project": "MyProject",
"include": "/include",
"plugins": "/plugins",
"compiler": {
"standard": "c++17",
"optimization": "O3"
}
}
```
---
## Plugin Files (.cp)
The `.cp` files tell IncludeCPP what to expose. They're auto-generated, but you can edit them:
```
SOURCE(calculator.cpp) calculator
PUBLIC(
calculator CLASS(Calculator) {
CONSTRUCTOR()
METHOD(add)
METHOD(subtract)
METHOD(getResult)
METHOD(reset)
}
)
```
Common directives:
- `CLASS(Name)` - expose a class
- `METHOD(name)` - expose a method
- `FUNC(name)` - expose a function
- `FIELD(name)` - expose a member variable
- `CONSTRUCTOR()` or `CONSTRUCTOR(int, string)` - expose constructor
---
## Requirements
- Python 3.9+
- C++ compiler (g++, clang++, or MSVC)
- CMake
pybind11 is installed automatically.
---
## More Help
```bash
includecpp --doc # Full documentation
includecpp --changelog # Version history
includecpp <command> --help
```
---
## HomeServer
Store and manage your modules, projects and files locally with the HomeServer:
```bash
# Install and start the server (one-time setup)
includecpp server install
# Manual start/stop
includecpp server start
includecpp server stop
includecpp server status
# Upload files or projects
includecpp server upload mymodule ./include/mymodule.cpp
includecpp server upload myproject ./myproject --project
# List, download, delete
includecpp server list
includecpp server download mymodule ./backup/
includecpp server delete mymodule
# Change port (default: 2007)
includecpp server port 3000
# Remove HomeServer completely
includecpp server deinstall
```
The server runs silently in the background and can auto-start with Windows.
---
## CSSL Scripting Language
CSSL is IncludeCPP's built-in scripting language with 330+ builtin functions, C++-style syntax, and advanced features like CodeInfusion and BruteInjection.
### Quick Example
```bash
# Run CSSL code
includecpp cssl run "printl('Hello from CSSL!');"
# Run a .cssl file
includecpp cssl file script.cssl
# Interactive REPL
includecpp cssl repl
```
### Features
- **C++ Containers**: `vector<T>`, `stack<T>`, `map<K,V>`, `queue<T>`, `datastruct<T>`
- **Classes & Inheritance**: `class Child : extends Parent { }`
- **Namespaces & Enums**: Organize code with `namespace mylib { }`
- **CodeInfusion**: Inject code into functions at runtime with `<<==`
- **BruteInjection**: Data manipulation with `<==` and filters
- **Snapshots**: Capture and restore variable states with `%variable`
- **C++ I/O Streams**: `cout << "Hello" << endl;`
- **Native/Unative**: Control C++/Python execution with keywords
### CSSL CLI
```bash
includecpp cssl run "code" # Execute code string
includecpp cssl file script.cssl # Run .cssl file
includecpp cssl repl # Interactive mode
includecpp cssl convert file.cssl # Convert to Python
includecpp cssl docs # Full documentation
```
Full documentation: `includecpp cssl docs` or see [CSSL_DOCUMENTATION.md](includecpp/core/cssl/CSSL_DOCUMENTATION.md)
---
## Experimental Features
IncludeCPP also includes experimental features:
- **AI Commands** - OpenAI-powered code analysis (`includecpp ai`)
- **CPPY** - Python to C++ conversion (`includecpp cppy`)
Enable with: `includecpp settings` → "Enable Experimental Features"
---
## Issues
Report bugs at: https://github.com/liliassg/IncludeCPP/issues
```bash
includecpp bug # Quick bug report
includecpp update # Update to latest version
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pybind11>=2.11.0 |
| - | click>=8.0.0 |
| - | typing-extensions>=4.0.0 |
| - | requests>=2.28.0 |
| - | colorama>=0.4.0 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl IncludeCPP-4.9.9:
pip install IncludeCPP-4.9.9.whl
نصب پکیج tar.gz IncludeCPP-4.9.9:
pip install IncludeCPP-4.9.9.tar.gz