Pieces-os-client

Latest version: v4.1.1

Safety actively analyzes 702116 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

4.0.0

**Major Improvements to the overall performance!!!**

> IMPORTANT: Now all the init files are cleared so to import a model you need to import it from the respective file

Example:
- Instead of
python
from pieces_os_client import Asset

- Use
python
from pieces_os_client.models.asset import Asset

Updates
- New class `BasicAnnotation`: `annotation.id` , `BasicAnnotation.from_id`, `annotation.type`, `annotation.raw_content` (setter and getter), `annotation. asset`, `annotation.chat`, `BasicAnnotation.create_annotation`, `annotation.delete()`, `BasicAnnotation.create()`
- New class `BasicTag`: `BasicTag.from_raw_content`, `BasicTag.create()`, `tag.id`, `tag.raw_content` (setter and getter), `tag.assets`, `tag.disassociate_asset`, `tag.associate_asset`, `tag.delete()`, `BasicTag.from_id()`, `BasicTag.exists`
- New class `BasicWebsite`: `BasicWebsite.from_raw_content`, `BasicWebsite.create`, `website.id`, `website.url` (setter and getter), `BasicWebsite.exists`, `website.name` (setter and getter), `wesbite.chats`, `website.assets`, `website.disassociate_asset`, `website.associate_asset`, `website.disassociate_chat`, `website.associate_chat`, `website.delete()`, `BasicWebsite.from_id()`
- New properties: `asset.markdown`, `message.chat`, `asset.tags`, `chat.summary`, `asset.websites`, `chat.websites`
- Added some more unittests by sambhavnoobcoder many thanks to him for his contributions

Deprecated
- `chat.description` use `chat.summary` instead
- `chat.annotations` and `assets.annotations` return BasicAnnotation instead of Annotation objects

Issues fixed
- 64
- 47


Example to the new stuff added

python
from pieces_os_client.wrapper import PiecesClient


client = PiecesClient()

ASSETS
assets = client.assets()

for asset in assets:
annotations = asset.annotations or []
websites = asset.websites or []
tags = asset.tags or []
name = asset.name
print(f"Asset name: {name}")
print(f"Asset ID: {asset.id}")
print(
"Annotations:",
", ".join([annotation.raw_content
for annotation in annotations])
)
print(
"Websites: ",
", ".join([website.url
for website in websites])
)
print(
"Tags: ",
", ".join([tag.raw_content
for tag in tags])
)
print("=====================")

CHATS
chats = client.copilot.chats()

for chat in chats:
annotations = chat.annotations or []
websites = chat.websites or []
summary = chat.summary or ""
name = chat.name


print(f"Chat name: {name}")
print(f"Chat ID: {chat.id}")
print(f"Chat Summary: {summary.replace("\n", " ")}")
print(
"Annotations:",
", ".join([annotation.raw_content
for annotation in annotations])
)
print(
"Websites: ",
", ".join([website.url
for website in websites])
)
print("=====================")


Messages
messages = chats[0].messages() Getting random chat

for message in messages:
annotations = message.annotations or []
print(f"Message content: {message.raw_content}")
print(f"Message Role: {message.role}")
print(
"Annotations:",
", ".join([annotation.raw_content
for annotation in annotations])
)
client.close()

3.2.1

3.2.0

Updates
- Compatibility with python 3.8
- Searching endpoint `BasicAsset.search("query")`
- New method is_pieces_running() to check if pieces os is running
- No longer will it raise an error if you initialized the client without PiecesOS is running (To work with Sublime environment)
- New client setter `host` to change the host (You must run the BaseWebsocket.reconnect_all) after it
- Editing an image asset should be implemented now (won't raise NotImplemeted error)
- New tests for searching

Bug fixes
- Fix BasicAsset.raw_content raise an error in some snippets
- Fix logout and connect to cloud methods

3.1.0

- Bugs fixed:
- host issue 45
- Copilot state issue 51
- Fix duplicate call to the on_update function 44
- Features:
- User/Auth 52: **NEW CLASS BasicUser** `pieces_client.user.login()`, `pieces_client.user.logout()`, `pieces_client.user.disconnect()`, `pieces_client.user.connect()`, `pieces_client.user.name`, `pieces_client.user.vanity_name`, `pieces_client.user.email`, `pieces_client.user.cloud_status`, `pieces_client.user.picture`
- Shareable link 38: `asset.share()` , `BasicAsset.share_raw_content("raw asset content goes here")`
- Pieces os utils Health, Version 43: `pieces_client.version`, `pieces_client.health`
- Create Conversation 49: `pieces_client.create_chat("name goes here")`
- Open Pieces OS: `pieces_client.open_pieces_os()`
- Version Compatibility Logic
- Deprecated
- PiecesClient config arg 36: (not useful) You should the kwargs if you want to turn the WebSocket off.
- pieces_client.get_user_profile_picture: Use `pieces_client.user.picture` instead

New Contributors
* jimbobbennett made their first contribution in https://github.com/pieces-app/pieces-os-client-sdk-for-python/pull/50
* sambhavnoobcoder made their first contribution in https://github.com/pieces-app/pieces-os-client-sdk-for-python/pull/56

**Full Changelog**: https://github.com/pieces-app/pieces-os-client-sdk-for-python/compare/v3.0.1...v3.1.0

3.0.1

3.0.0

Page 2 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.