New Features
This release introduces several new features, improvements, and internal changes.
🐍 Post-Scripts Support with Python
Chapar now supports post-request scripts written in Python! For example:
import chapar
print("print test")
print("content-type", request.headers['Content-Type'])
def on_response(response):
if response.status_code == 200:
chapar.set_env('Stage_token', response.json()['Token'])
else:
print('Error:', response.text, response.status_code)
chapar.on_response = on_response
This allows users to define custom logic to run after a request completes. In this first version, Chapar runs scripts inside an isolated Docker environment. You’ll need to enable scripting before using this feature.
More scripting capabilities and APIs will be added in future releases.
⚙️ Settings Page
By popular demand, Chapar now has a Settings page!
Many users asked for the ability to store their data in a custom location. That led to a refactor of how Chapar manages data and configuration files.
With the new settings page, you can:
- Change the data storage location
- Customize editor preferences
- Adjust general application settings
🖥️ Console Section
A new Console section has been added to the bottom of the application.
It displays:
- Application logs
- Output from
print()
statements in your scripts
This makes debugging and visibility much easier.
🔔 Notifications
Chapar now includes a Notifications section in the footer.
It shows important messages such as:
- When the scripting server starts
- Errors or events that need your attention
Note: This feature is still limited but will be expanded in future updates.
🧹 Code Improvements
- Don’t override
HTTPRequestSpec
#118 by @brunnre8 - Add macOS build scripts #120 by @mirzakhany
- Use JetBrains Mono Regular font in the editor #124 by @mirzakhany
- Refactor filesystem #131 by @mirzakhany
- Improve workspace UX tolerance #135 by @Isaac799
- Update
gvcode
to latest version #138 by @mirzakhany
🧑💻 New Contributors
🔗 Full Changelog: Compare v0.3.4...v0.4.0