chanty


Namechanty JSON
Version 0.4.1 PyPI version JSON
download
home_pageNone
SummaryTool for creating cool Minecraft datapacks
upload_time2025-10-13 10:30:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Ethosa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords automation commands datapack dsl minecraft
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# Chanty
### Write Minecraft datapacks easely with Python

</div>

**chanty** is a Python DSL for writing Minecraft datapacks as if they were real code.  
No more messy `.mcfunction` files - just cliean, structured logic.


## Features

- **Pythonic Datapack Development**
  Write Minecraft datapack using real Python code instead of raw `.mcfunction` files.
- **Command Builder API**
  Generate complex Minecraft commands (`execute`, `summon`, `scoreboard`, etc.) programmatically and dynamically.
- **Custom Item System**
  Create fully functional custom items with names, lore, events and NBT attributes - all in code.
- **Hot Reloading**
  Automatically rebuild and export your dapatack whenever a Python file changes (you still should to use `/reload` command in game).
- **Automatic Resourcepack Exporting**
  Export resourcepaks as ready-to-import `.zip` archives.


## Install
```shell
pip install chanty
```


## CLI Usage

### Creating Project
```shell
chanty create test-project

cd test-project
```

### Build Datapack
To build and export your datapack, use:
```shell
chanty build MAIN_FILE:PACK_VARIABLE --ARGS
```

Exporting to the default .minecraft saves folder:
```shell
chanty build main:pack --world_name="New World"
```

Exporting to Modrinth App:
```shell
chanty build main:pack --modrinth="ProfileName:New World"
```

Exporting to a custom destination:
```shell
chanty build main:pack --to="./builds/datapack"
```


Exporting to a `./builds/<datapack_name>` folder:
```shell
chanty build main:pack --output="./builds"
```


### Development Mode
You can start the `dev` mode to automatically re-export your datapack every time any `.py` file changes. 

Supported arguments: `--save_folder`, `--world_name`, and `--modrinth`.

```shell
chanty dev main:pack --modrinth="ProfileName:New World"
```


### Up Project
After updating your Chanty version, use:
```shell
chanty up
```
to synchronize your project structure with the latest Chanty template.


## Usage

### Simple example
```py
from chanty import Datapack, Namespace, CommandBuilder

pack = DataPack('my_awesome_datapack')
namespace = Namespace('main')

@namespace.on_load
def handle_on_load() -> str:
    with CommandBuilder() as cmd:
        cmd.tellraw('Hello world from chanty datapack!')
    return cmd.build()


# Export into folder
if __name__ == '__main__':
    pack.export('./my_datapack')
```


### Custom Items
```py
from chanty import DataPack Namespace, CommandBuilder, CustomItem, Item


pack = DataPack('my_awesome_datapack')
namespace = Namespace('main')

my_cool_item = CustomItem(Item.STICK)
my_cool_item.set_name('§6§l[Chanty]§f§r Debugger')
my_cool_item.set_lore(
    'This is a not just stick ...',
    'This is a §6§l[Chanty]§f§r Debugger!',
)
my_cool_item.glint(True)
@my_cool_item.on_right_click
def handle_right_click():
    with CommandBuilder() as cmd:
        cmd.say('Hello!')
    return cmd.build()

namespace.register(my_cool_item)

if __name__ == '__main__':
    pack.export('./my_datapack')
```


## In The Future ...

- Asset management
- Achievements
- More built-in event hooks
- CLI improvements

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "chanty",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "automation, commands, datapack, dsl, minecraft",
    "author": null,
    "author_email": "Ethosa <social.ethosa@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d8/38/20d218203152b0e817990d57909dfb2ac8d8a6a3ccdb04bdfcd209f0f7b8/chanty-0.4.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# Chanty\n### Write Minecraft datapacks easely with Python\n\n</div>\n\n**chanty** is a Python DSL for writing Minecraft datapacks as if they were real code.  \nNo more messy `.mcfunction` files - just cliean, structured logic.\n\n\n## Features\n\n- **Pythonic Datapack Development**\n  Write Minecraft datapack using real Python code instead of raw `.mcfunction` files.\n- **Command Builder API**\n  Generate complex Minecraft commands (`execute`, `summon`, `scoreboard`, etc.) programmatically and dynamically.\n- **Custom Item System**\n  Create fully functional custom items with names, lore, events and NBT attributes - all in code.\n- **Hot Reloading**\n  Automatically rebuild and export your dapatack whenever a Python file changes (you still should to use `/reload` command in game).\n- **Automatic Resourcepack Exporting**\n  Export resourcepaks as ready-to-import `.zip` archives.\n\n\n## Install\n```shell\npip install chanty\n```\n\n\n## CLI Usage\n\n### Creating Project\n```shell\nchanty create test-project\n\ncd test-project\n```\n\n### Build Datapack\nTo build and export your datapack, use:\n```shell\nchanty build MAIN_FILE:PACK_VARIABLE --ARGS\n```\n\nExporting to the default .minecraft saves folder:\n```shell\nchanty build main:pack --world_name=\"New World\"\n```\n\nExporting to Modrinth App:\n```shell\nchanty build main:pack --modrinth=\"ProfileName:New World\"\n```\n\nExporting to a custom destination:\n```shell\nchanty build main:pack --to=\"./builds/datapack\"\n```\n\n\nExporting to a `./builds/<datapack_name>` folder:\n```shell\nchanty build main:pack --output=\"./builds\"\n```\n\n\n### Development Mode\nYou can start the `dev` mode to automatically re-export your datapack every time any `.py` file changes. \n\nSupported arguments: `--save_folder`, `--world_name`, and `--modrinth`.\n\n```shell\nchanty dev main:pack --modrinth=\"ProfileName:New World\"\n```\n\n\n### Up Project\nAfter updating your Chanty version, use:\n```shell\nchanty up\n```\nto synchronize your project structure with the latest Chanty template.\n\n\n## Usage\n\n### Simple example\n```py\nfrom chanty import Datapack, Namespace, CommandBuilder\n\npack = DataPack('my_awesome_datapack')\nnamespace = Namespace('main')\n\n@namespace.on_load\ndef handle_on_load() -> str:\n    with CommandBuilder() as cmd:\n        cmd.tellraw('Hello world from chanty datapack!')\n    return cmd.build()\n\n\n# Export into folder\nif __name__ == '__main__':\n    pack.export('./my_datapack')\n```\n\n\n### Custom Items\n```py\nfrom chanty import DataPack Namespace, CommandBuilder, CustomItem, Item\n\n\npack = DataPack('my_awesome_datapack')\nnamespace = Namespace('main')\n\nmy_cool_item = CustomItem(Item.STICK)\nmy_cool_item.set_name('\u00a76\u00a7l[Chanty]\u00a7f\u00a7r Debugger')\nmy_cool_item.set_lore(\n    'This is a not just stick ...',\n    'This is a \u00a76\u00a7l[Chanty]\u00a7f\u00a7r Debugger!',\n)\nmy_cool_item.glint(True)\n@my_cool_item.on_right_click\ndef handle_right_click():\n    with CommandBuilder() as cmd:\n        cmd.say('Hello!')\n    return cmd.build()\n\nnamespace.register(my_cool_item)\n\nif __name__ == '__main__':\n    pack.export('./my_datapack')\n```\n\n\n## In The Future ...\n\n- Asset management\n- Achievements\n- More built-in event hooks\n- CLI improvements\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Ethosa\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Tool for creating cool Minecraft datapacks",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/Ethosa/chanty",
        "Source": "https://github.com/Ethosa/chanty"
    },
    "split_keywords": [
        "automation",
        " commands",
        " datapack",
        " dsl",
        " minecraft"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b3eaac98cf79942b614fbc4f862f04c3f797a39fad0a74a990ef0e3f6f7d65aa",
                "md5": "a4928180150f8cb5e6b325aa0c40dd51",
                "sha256": "fbcf8c08bda00e1e24f72608dfd70db228b2ac3e05f8bba3fe302440522c31db"
            },
            "downloads": -1,
            "filename": "chanty-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a4928180150f8cb5e6b325aa0c40dd51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 30513,
            "upload_time": "2025-10-13T10:30:45",
            "upload_time_iso_8601": "2025-10-13T10:30:45.668307Z",
            "url": "https://files.pythonhosted.org/packages/b3/ea/ac98cf79942b614fbc4f862f04c3f797a39fad0a74a990ef0e3f6f7d65aa/chanty-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d83820d218203152b0e817990d57909dfb2ac8d8a6a3ccdb04bdfcd209f0f7b8",
                "md5": "d45d49c43dc75d747c200b2e12dbb042",
                "sha256": "a937280030e0b43c68aa70df5ed68c7c8e60bcd258d523b633b10dd5d2335808"
            },
            "downloads": -1,
            "filename": "chanty-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d45d49c43dc75d747c200b2e12dbb042",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 21967,
            "upload_time": "2025-10-13T10:30:47",
            "upload_time_iso_8601": "2025-10-13T10:30:47.810714Z",
            "url": "https://files.pythonhosted.org/packages/d8/38/20d218203152b0e817990d57909dfb2ac8d8a6a3ccdb04bdfcd209f0f7b8/chanty-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-13 10:30:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Ethosa",
    "github_project": "chanty",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "chanty"
}
        
Elapsed time: 3.36018s