Name | iid42 JSON |
Version |
2025.1.10.1052
JSON |
| download |
home_page | None |
Summary | Help building app using Index Integer Date format IID |
upload_time | 2025-01-10 21:53:13 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.0 |
license | None |
keywords |
iid
date
development
index
integer
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PyPI: IID42
PyPi: https://pypi.org/project/iid42
-----------------
## Commencez à apprendre : `pip install iid42`
Cet outil a été créé pour aider à apprendre la programmation par le jeu.
Vous trouverez dans *Scratch To Warcraft* du code permettant de simuler des touches de clavier :
- [https://github.com/EloiStree/2024_08_29_ScratchToWarcraft](https://github.com/EloiStree/2024_08_29_ScratchToWarcraft)
Vous pouvez également utiliser *XOMI* pour simuler des manettes Xbox sur Windows :
- [https://github.com/EloiStree/2022_01_24_XOMI](https://github.com/EloiStree/2022_01_24_XOMI)
Si vous préférez injecter des touches, vous trouverez du code compatible avec Raspberry Pi Pico et ESP32 ici :
- [https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW](https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW)
- [https://github.com/EloiStree/2024_11_21_ESP32HC05RC](https://github.com/EloiStree/2024_11_21_ESP32HC05RC)
Si vous souhaitez héberger un serveur Raspberry Pi avec des clés d'accès pour IID42 :
- Installer Raspberry Pi : [https://github.com/EloiStree/2024_12_05_RaspberryPiGate](https://github.com/EloiStree/2024_12_05_RaspberryPiGate)
- Serveur : [https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID](https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID)
- Client Unity3D : [https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS)
- Client Python : [https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS)
Vous trouverez un tutoriel pour IID42 en Python, C#, et Unity3D ici :
[https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21](https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21)
## Start Learning: `pip install iid42`
This tool was created to help you learn programming through games.
In *Scratch To Warcraft*, you'll find code to simulate keyboard inputs:
- [https://github.com/EloiStree/2024_08_29_ScratchToWarcraft](https://github.com/EloiStree/2024_08_29_ScratchToWarcraft)
You can also use *XOMI* to simulate Xbox controllers on Windows:
- [https://github.com/EloiStree/2022_01_24_XOMI](https://github.com/EloiStree/2022_01_24_XOMI)
If you're more interested in injecting key inputs, you'll find code for the Raspberry Pi Pico and ESP32 here:
- [https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW](https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW)
- [https://github.com/EloiStree/2024_11_21_ESP32HC05RC](https://github.com/EloiStree/2024_11_21_ESP32HC05RC)
If you'd like to host a Raspberry Pi server with access keys for IID42:
- Install Raspberry Pi: [https://github.com/EloiStree/2024_12_05_RaspberryPiGate](https://github.com/EloiStree/2024_12_05_RaspberryPiGate)
- Server: [https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID](https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID)
- Unity3D Client: [https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS)
- Python Client: [https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS)
You can find a tutorial for IID42 in Python, C#, and Unity3D here:
[https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21](https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21)
---
**It is as easy as this:**
- Download python: https://www.python.org/downloads/
- Open Window terminal and type `pip install iid42`
- Create the following file:
``` py
# pip install iid42
import iid42
from iid42 import SendUdpIID
# Send IID to a UDP Gate Relay
# Replace 127.0.0.1 with the computer you want to target or the game server
# Example: 192.168.1.42 http://apint.ddns.net
target = SendUdpIID("127.0.0.1",3615,True)
# Send the action 42 to the target with UDP to 127.0.0.1 computer on the applicaton behind 3615 port.
target.push_integer(42)
# Send the action 42 to the player 2 to the target with UDP to 127.0.0.1 computer on the applicaton behind 3615 port.
target.push_index_integer(2,42)
# Send the action 42 to all the player to the target with UDP to 127.0.0.1 computer on the applicaton behind 3615 port.
target.push_index_integer(0,42)
```
**IID**, short for **Index Integer Date**, is a 4/8/12/16-byte format designed for seamless communication across various network systems, including UDP, WebSocket, and Mirror.
By standardizing the code and API to work exclusively with integer values:
- It enables the creation of action index tables.
- It supports the development of specialized tools for specific tasks, allowing IID to facilitate remote actions effectively.
The **IID format** was developed to streamline QA testing across multiple devices and computers with precise timing coordination.
### Key Features of IID:
1. **Index on your own server**: Identifies the target device.
2. **Index on a shared server**: Identifies the user.
3. **Value**: Represents the transported integer value.
4. **Date**: Encoded in a specific `ulong` format:
- **01.....TICK**: Sent using NTP time.
- **02.....TICK**: Intended for execution at a designated NTP time.
- **.......TICK**: Sent from an unknown source time but uses `DateTime.Now` in UTC since 1970.
If you need assistance or are interested in contributing to this project, feel free to reach out.
Since 2024, all my tools have been built around this principle.
---
```
/*
* ----------------------------------------------------------------------------
* "PIZZA LICENSE":
* https://github.com/EloiStree wrote this file.
* As long as you retain this notice, you
* can do whatever you want with this code.
* If you think my code saved you time,
* consider sending me a 🍺 or a 🍕 at:
* - https://buymeacoffee.com/apintio
*
* You can also support my work by building your own DIY input device
* using these Amazon links:
* - https://github.com/EloiStree/HelloInput
*
* May the code be with you.
*
* Updated version: https://github.com/EloiStree/License
* ----------------------------------------------------------------------------
*/
```
**Sample of code to show how to use a console version to play on the server from "chat":**
``` py
import os
import sys
if False:
cmd = "pip install iid42 --force-reinstall"
os.system(cmd)
import iid42
from iid42 import HelloWorldIID
HelloWorldIID.console_loop_to_push_iid_apintio()
```
**Play on the Twitch Play server with a loop:**
``` py
import os
import sys
if False:
cmd = "pip install iid42 --force-reinstall"
os.system(cmd)
import iid42
from iid42 import SendUdpIID
import time
target = SendUdpIID("apint.ddns.net", 3615, use_ntp= True)
while True:
# Request to press a key in 50 ms from now on ntp time
target.push_bytes(iid42.iid_ms(0,1001,50))
# Request to release it a key in 550 ms from now on ntp time
target.push_bytes(iid42.iid_ms(0,2001,550))
# Every 2 seconds
time.sleep(2)
t = time.time()+1000
t_offset = t + target.ntp_offset_local_to_server_in_milliseconds
print(f"TIME:{t} NTP:{t_offset}")
```
Example using a local time queue as a thread clock.
``` py
import os
import sys
if False:
cmd = "pip install iid42 --force-reinstall"
os.system(cmd)
import iid42
from iid42 import SendUdpIID
target = SendUdpIID("apint.ddns.net",3615,True,True)
print("IVP4", target.ivp4)
target.push_index_integer_in_queue(1,1082,0)
target.push_index_integer_in_queue(1,2082,1000)
target.push_index_integer_in_queue(1,1037,2000)
target.push_index_integer_in_queue(1,2037,4000)
target.push_index_integer_in_queue(1,1038,5000)
target.push_index_integer_in_queue(1,2038,6000)
target.push_index_integer_in_queue(1,1039,7000)
target.push_index_integer_in_queue(1,2039,8000)
target.push_integer_in_queue(2082,11000)
target.push_integer_in_queue(1037,12000)
target.push_integer_in_queue(2037,14000)
target.push_integer_in_queue(1038,15000)
target.push_integer_in_queue(2038,16000)
target.push_integer_in_queue(1039,17000)
target.push_integer_in_queue(2039,18000)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "iid42",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": null,
"keywords": "IID, date, development, index, integer",
"author": null,
"author_email": "Eloi Stree <eloistree@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d3/1d/8f7e2dbeb67c5f056e7a29cac492e3c1f7a519d859653dfe1d2ec7ba65ce/iid42-2025.1.10.1052.tar.gz",
"platform": null,
"description": "# PyPI: IID42\n\nPyPi: https://pypi.org/project/iid42\n\n\n-----------------\n\n\n## Commencez \u00e0 apprendre : `pip install iid42`\n\nCet outil a \u00e9t\u00e9 cr\u00e9\u00e9 pour aider \u00e0 apprendre la programmation par le jeu.\n\nVous trouverez dans *Scratch To Warcraft* du code permettant de simuler des touches de clavier : \n- [https://github.com/EloiStree/2024_08_29_ScratchToWarcraft](https://github.com/EloiStree/2024_08_29_ScratchToWarcraft)\n\nVous pouvez \u00e9galement utiliser *XOMI* pour simuler des manettes Xbox sur Windows : \n- [https://github.com/EloiStree/2022_01_24_XOMI](https://github.com/EloiStree/2022_01_24_XOMI)\n\nSi vous pr\u00e9f\u00e9rez injecter des touches, vous trouverez du code compatible avec Raspberry Pi Pico et ESP32 ici : \n- [https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW](https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW) \n- [https://github.com/EloiStree/2024_11_21_ESP32HC05RC](https://github.com/EloiStree/2024_11_21_ESP32HC05RC)\n\nSi vous souhaitez h\u00e9berger un serveur Raspberry Pi avec des cl\u00e9s d'acc\u00e8s pour IID42 : \n- Installer Raspberry Pi : [https://github.com/EloiStree/2024_12_05_RaspberryPiGate](https://github.com/EloiStree/2024_12_05_RaspberryPiGate) \n- Serveur : [https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID](https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID) \n - Client Unity3D : [https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS) \n - Client Python : [https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS)\n\nVous trouverez un tutoriel pour IID42 en Python, C#, et Unity3D ici : \n[https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21](https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21)\n\n\n## Start Learning: `pip install iid42`\n\nThis tool was created to help you learn programming through games.\n\nIn *Scratch To Warcraft*, you'll find code to simulate keyboard inputs: \n- [https://github.com/EloiStree/2024_08_29_ScratchToWarcraft](https://github.com/EloiStree/2024_08_29_ScratchToWarcraft)\n\nYou can also use *XOMI* to simulate Xbox controllers on Windows: \n- [https://github.com/EloiStree/2022_01_24_XOMI](https://github.com/EloiStree/2022_01_24_XOMI)\n\nIf you're more interested in injecting key inputs, you'll find code for the Raspberry Pi Pico and ESP32 here: \n- [https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW](https://github.com/EloiStree/2024_11_16_WowIntegerWorkshopPicoW) \n- [https://github.com/EloiStree/2024_11_21_ESP32HC05RC](https://github.com/EloiStree/2024_11_21_ESP32HC05RC)\n\nIf you'd like to host a Raspberry Pi server with access keys for IID42: \n- Install Raspberry Pi: [https://github.com/EloiStree/2024_12_05_RaspberryPiGate](https://github.com/EloiStree/2024_12_05_RaspberryPiGate) \n- Server: [https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID](https://github.com/EloiStree/2025_01_01_HelloMegaMaskPushToIID) \n - Unity3D Client: [https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_UnityToServerTunnelingMetaMaskWS) \n - Python Client: [https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS](https://github.com/EloiStree/2025_01_01_PythonToServerTunnelingMetaMaskWS)\n\nYou can find a tutorial for IID42 in Python, C#, and Unity3D here: \n[https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21](https://github.com/EloiStree/2025_02_03_MonsLevelUpInGroup/issues/21) \n\n\n--- \n\n\n\n**It is as easy as this:**\n- Download python: https://www.python.org/downloads/\n- Open Window terminal and type `pip install iid42`\n- Create the following file: \n\n``` py\n# pip install iid42\nimport iid42\nfrom iid42 import SendUdpIID\n# Send IID to a UDP Gate Relay\n# Replace 127.0.0.1 with the computer you want to target or the game server\n# Example: 192.168.1.42 http://apint.ddns.net \ntarget = SendUdpIID(\"127.0.0.1\",3615,True)\n# Send the action 42 to the target with UDP to 127.0.0.1 computer on the applicaton behind 3615 port.\ntarget.push_integer(42)\n# Send the action 42 to the player 2 to the target with UDP to 127.0.0.1 computer on the applicaton behind 3615 port.\ntarget.push_index_integer(2,42)\n\n# Send the action 42 to all the player to the target with UDP to 127.0.0.1 computer on the applicaton behind 3615 port.\ntarget.push_index_integer(0,42)\n```\n\n\n\n**IID**, short for **Index Integer Date**, is a 4/8/12/16-byte format designed for seamless communication across various network systems, including UDP, WebSocket, and Mirror.\n\nBy standardizing the code and API to work exclusively with integer values:\n- It enables the creation of action index tables.\n- It supports the development of specialized tools for specific tasks, allowing IID to facilitate remote actions effectively.\n\nThe **IID format** was developed to streamline QA testing across multiple devices and computers with precise timing coordination.\n\n### Key Features of IID:\n1. **Index on your own server**: Identifies the target device.\n2. **Index on a shared server**: Identifies the user.\n3. **Value**: Represents the transported integer value.\n4. **Date**: Encoded in a specific `ulong` format:\n - **01.....TICK**: Sent using NTP time.\n - **02.....TICK**: Intended for execution at a designated NTP time.\n - **.......TICK**: Sent from an unknown source time but uses `DateTime.Now` in UTC since 1970.\n\nIf you need assistance or are interested in contributing to this project, feel free to reach out. \nSince 2024, all my tools have been built around this principle.\n\n---\n\n```\n/*\n * ----------------------------------------------------------------------------\n * \"PIZZA LICENSE\":\n * https://github.com/EloiStree wrote this file.\n * As long as you retain this notice, you\n * can do whatever you want with this code.\n * If you think my code saved you time,\n * consider sending me a \ud83c\udf7a or a \ud83c\udf55 at:\n * - https://buymeacoffee.com/apintio\n * \n * You can also support my work by building your own DIY input device\n * using these Amazon links:\n * - https://github.com/EloiStree/HelloInput\n *\n * May the code be with you.\n *\n * Updated version: https://github.com/EloiStree/License\n * ----------------------------------------------------------------------------\n */\n```\n\n\n\n**Sample of code to show how to use a console version to play on the server from \"chat\":** \n\n``` py\nimport os\nimport sys\n\nif False:\n cmd = \"pip install iid42 --force-reinstall\"\n os.system(cmd)\n\nimport iid42\nfrom iid42 import HelloWorldIID\n\nHelloWorldIID.console_loop_to_push_iid_apintio()\n\n```\n\n\n**Play on the Twitch Play server with a loop:**\n``` py\nimport os\nimport sys\n\nif False:\n cmd = \"pip install iid42 --force-reinstall\"\n os.system(cmd)\n\nimport iid42\nfrom iid42 import SendUdpIID\nimport time\n\ntarget = SendUdpIID(\"apint.ddns.net\", 3615, use_ntp= True)\nwhile True:\n # Request to press a key in 50 ms from now on ntp time\n target.push_bytes(iid42.iid_ms(0,1001,50))\n # Request to release it a key in 550 ms from now on ntp time\n target.push_bytes(iid42.iid_ms(0,2001,550))\n # Every 2 seconds\n time.sleep(2)\n t = time.time()+1000\n t_offset = t + target.ntp_offset_local_to_server_in_milliseconds\n print(f\"TIME:{t} NTP:{t_offset}\")\n\n```\n\n\n\nExample using a local time queue as a thread clock.\n``` py \nimport os\nimport sys\n\nif False:\n cmd = \"pip install iid42 --force-reinstall\"\n os.system(cmd)\n\nimport iid42\nfrom iid42 import SendUdpIID\n\ntarget = SendUdpIID(\"apint.ddns.net\",3615,True,True)\nprint(\"IVP4\", target.ivp4)\ntarget.push_index_integer_in_queue(1,1082,0)\ntarget.push_index_integer_in_queue(1,2082,1000)\ntarget.push_index_integer_in_queue(1,1037,2000)\ntarget.push_index_integer_in_queue(1,2037,4000)\ntarget.push_index_integer_in_queue(1,1038,5000)\ntarget.push_index_integer_in_queue(1,2038,6000)\ntarget.push_index_integer_in_queue(1,1039,7000)\ntarget.push_index_integer_in_queue(1,2039,8000)\n\ntarget.push_integer_in_queue(2082,11000)\ntarget.push_integer_in_queue(1037,12000)\ntarget.push_integer_in_queue(2037,14000)\ntarget.push_integer_in_queue(1038,15000)\ntarget.push_integer_in_queue(2038,16000)\ntarget.push_integer_in_queue(1039,17000)\ntarget.push_integer_in_queue(2039,18000)\n\n\n```",
"bugtrack_url": null,
"license": null,
"summary": "Help building app using Index Integer Date format IID",
"version": "2025.1.10.1052",
"project_urls": {
"Homepage": "https://github.com/EloiStree/pypi_iid",
"Issues": "https://github.com/EloiStree/pypi_iid"
},
"split_keywords": [
"iid",
" date",
" development",
" index",
" integer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "30700540f794955a03fa59c952a99fe5f69374d09b548eaf1ae1980d7820121b",
"md5": "4c9ea8ac5bf3720c589a8fde9e343cd5",
"sha256": "95c6a2b851e3ac2835bff8673847d2a0d7d481126c17beef685b9b585b0b413f"
},
"downloads": -1,
"filename": "iid42-2025.1.10.1052-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c9ea8ac5bf3720c589a8fde9e343cd5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.0",
"size": 9492,
"upload_time": "2025-01-10T21:53:09",
"upload_time_iso_8601": "2025-01-10T21:53:09.872498Z",
"url": "https://files.pythonhosted.org/packages/30/70/0540f794955a03fa59c952a99fe5f69374d09b548eaf1ae1980d7820121b/iid42-2025.1.10.1052-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d31d8f7e2dbeb67c5f056e7a29cac492e3c1f7a519d859653dfe1d2ec7ba65ce",
"md5": "ab3479dec8bdc08c71bde6593c64034b",
"sha256": "e43987343fe4a066358ace8e391e31bb5980142cb1c5b1b57703565355e7b93d"
},
"downloads": -1,
"filename": "iid42-2025.1.10.1052.tar.gz",
"has_sig": false,
"md5_digest": "ab3479dec8bdc08c71bde6593c64034b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 10633,
"upload_time": "2025-01-10T21:53:13",
"upload_time_iso_8601": "2025-01-10T21:53:13.815689Z",
"url": "https://files.pythonhosted.org/packages/d3/1d/8f7e2dbeb67c5f056e7a29cac492e3c1f7a519d859653dfe1d2ec7ba65ce/iid42-2025.1.10.1052.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-10 21:53:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "EloiStree",
"github_project": "pypi_iid",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "iid42"
}