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.12.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.12-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: magicfeedback-1.0.12.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.12.tar.gz
Algorithm Hash digest
SHA256 21240e414e04b29b1cea14e502d010b12d58c2e3695c664a262fb9293051e15f
MD5 1c522de49dadf1c4fdb93f6921619a6c
BLAKE2b-256 c98b4e5db35c44b902dff72502522b5782be2716b45e60e99a2143ed17d51e67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: magicfeedback-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a02745796814d15ac71fb1c498de78d6e4d95a0c2657db93b49f5e70e0409630
MD5 d85ece243b782a299d1c3b3a3388b7ec
BLAKE2b-256 89698aa3406af0e77dd89c2f4f22b6075ad5034590821c7b71c6b8cf76f2d193

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