Skip to main content

SDK for MagicFeedback API

Project description

MagicFeedback SDK

A Python SDK for interacting with the MagicFeedback API

Installation

pip install MagicFeedback

Note: the distribution name on PyPI is MagicFeedback, but the import name is magicfeedback_sdk.

Usage

from magicfeedback_sdk import MagicFeedback

# Create a client instance
client = MagicFeedback("email", "password")

# Create a new feedback item
feedback_data = {
    "name": "Test Feedback",
    "type": "APP",
    "identity": "MAGICFORM",
    "integrationId": "your-integration-id",
    "companyId": "YOUR_COMPANY",
    "productId": "YOUR_PRODUCT",
    "answers": [
        {"key": "score", "value": "4"},
        {"key": "comment", "value": "Great service!"},
    ],
}

response = client.feedbacks.create(feedback_data)
print(response)

Required fields for feedbacks.create(): name, type, identity, integrationId, companyId, productId.

API Reference

The client exposes several sub-APIs:

client.feedbacks

  • create(feedback) — creates a new feedback item.
  • get(filter=None) — lists feedback items.
  • get_id(feedback_id, filter=None) — retrieves a specific feedback item.
  • update(feedback_id, feedback) — updates a feedback item.
  • delete(feedback_id) — deletes a feedback item.

client.contacts

  • create(contact), get(filter=None), update(contact_id, contact), delete(contact_id)

client.campaigns

  • create(campaign), get(filter=None)
  • create_session(campaign_id, session), get_sessions(campaign_id, filter=None), get_sessions_feedbacks(campaign_id, filter=None)

client.metrics

  • get(filter=None)

client.products

  • get(filter=None)

client.companies

  • get(filter=None), get_id(id, filter=None)

client.integrations_questions

  • get(integration_id, filter=None)

client.reports

  • get(filter=None), get_newsletter(filter=None), update(report_id, report)

client.requests

  • get(filter=None), get_id(request_id, filter=None), update(request_id, request)

Logging

import logging
client.set_logging(logging.DEBUG)

Additional Information

  • Authentication: the SDK requires a user / password obtained from the MagicFeedback platform.
  • Error Handling: the SDK handles common API errors and raises appropriate exceptions.
  • Custom base URL: pass base_url="..." to MagicFeedback(...) to target a non-default environment.

License

This project is licensed under the MIT License.

Contact

For any questions or support, please contact farias@magicfeedback.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magicfeedback-1.0.11.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magicfeedback-1.0.11-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file magicfeedback-1.0.11.tar.gz.

File metadata

  • Download URL: magicfeedback-1.0.11.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for magicfeedback-1.0.11.tar.gz
Algorithm Hash digest
SHA256 147974a3f77bda48b1c5381c7453cb3d993b38032170a466c37116edd656e50a
MD5 05b0996dfdcc1f768f2d46880f384bc6
BLAKE2b-256 6555aea71e24ec60f72a83297d00aca5423e918b88c6ca8fcdcb852e5b359441

See more details on using hashes here.

File details

Details for the file magicfeedback-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: magicfeedback-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for magicfeedback-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 3617c1384a6cd502917ad5675c544c6c987f514fda83e60f2d05a4af4ac38793
MD5 2e45be019e6ffa4449baca0e92850a3a
BLAKE2b-256 8ebefa2e046059ec74674040f9e7936eb00f00fcfc98485d37280987458dd7f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page