feat: add the code (#1)
Clone from repository:
git clone https://github.com/casbin/casbin-python-cli.git cd casbin-python-cli pip install -r requirements.txt
python -m casbin_cli.client [command] [options] [args] python -m casbin_cli.client enforce -m "examples/rbac_model.conf" -p "examples/rbac_policy.csv" "alice" "data1" "read" {"allow":true,"explain":null}
casbin-python-cli/ ├── casbin_cli/ │ ├── __init__.py │ ├── client.py # Main entry point and CLI argument parsing │ ├── command_executor.py # Dynamic method execution and JSON response │ ├── enforcer_factory.py # Enforcer creation and input validation │ ├── response.py # JSON response formatting │ └── utils.py # Utility functions ├── examples/ # Example configuration files ├── requirements.txt # Python dependencies ├── setup.py # Package installation script └── README.md
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.