Convert the attached technical description, file, or Repomix...
Prompt
Convert the attached technical description, file, or Repomix export into a build prompt. Return only that prompt, not the implementation. Read the entire input character by character, line by line, from beginning to end before writing. Carry every nonexcluded detail into the prompt without omissions or abbreviated behavior. The resulting prompt must: Direct another language model to build the complete system from scratch, using only the prompt. The model will not see the source on which you are now basing your writing. Fully specify all functionality, architecture. Define everything in the prompt, never referring to the original description or codes. Identify every necessary file and its required contents and behavior. Prohibit the use of any of the following: authentication/authorization, access control, security policies/auditing/monitoring/ rate/usage/product limits, quotas, tests/documentation, source/config comments, placeholder/mock/dummy implementations, fake services, TODO, unimplemented methods, omitted files/functions. Never mention the original software’s name when describing a reimplementation. Replace name-bearing identifiers with neutral descriptive identifiers ================================================================ Directory Structure ================================================================ sellix/ resources/ __init__.py blacklist.py categories.py customers.py orders.py payments.py products.py queries.py whitelists.py __init__.py setup.py ================================================================ Files ================================================================ ================ File: sellix/resources/__init__.py ================ ================ File: sellix/resources/blacklist.py ================ def get_blacklists(self): return self.handle_response( self.request("/blacklists"), "blacklists" ) def create_blacklist(self, **kwargs): return self.handle_response( self.request("/blacklists", "POST", kwargs), "uniqid" ) def get_blacklist(self, uniqid): return self.handle_response( self.request(f"/blacklists/{uniqid}"), "blacklist" ) def update_blacklist(self, uniqid, **kwargs): return self.handle_response( self.request(f"/blacklists/{uniqid}", "PUT", kwargs) ) def delete_blacklist(self, uniqid): return self.handle_response( self.request(f"/blacklists/{uniqid}", "DELETE") ) ================ File: sellix/resources/categories.py ================ def get_categories(self): return self.handle_response( self.request("/categories"), "categories" ) def create_category(self, **kwargs): return self.handle_response( self.request("/categories", "POST", kwargs), "uniqid" ) def get_category(self, uniqid): return self.handle_response( self.request(f"/categories/{uniqid}"), "category" ) def update_category(self, uniqid, **kwargs): return self.handle_response( self.request(f"/categories/{uniqid}", "PUT", kwargs) ) def delete_category(self, uniqid): return self.handle_response( self.request(f"/categories/{uniqid}", "DELETE") ) ================ File: sellix/resources/customers.py ================ def get_customers(self): return self.handle_response( self.request("/customers"), "customers" ) def create_customer(self, **kwargs): return self.handle_response( self.request("/customers", "POST", kwargs), "customer_id" ) def get_customer(self, id): return self.handle_response( self.request(f"/customers/{id}"), "customer" ) def update_customer(self, id, **kwargs): return self.handle_response( self.request(f"/customers/{id}", "PUT", kwargs) ) ================ File: sellix/resources/orders.py ================ def get_orders(self): return self.handle_response( self.request("/orders"), "orders" ) def get_order(self, uniqid): return self.handle_response( self.request(f"/orders/{uniqid}"), "order" ) def update_order(self, uniqid, **kwargs): return self.handle_response( self.request(f"/orders/update/{uniqid}", "PUT", kwargs), "order" ) def issue_order_replacement(self, uniqid, **kwargs): return self.handle_response( self.request(f"/orders/replacement/{uniqid}", "POST", kwargs) ) def update_custom_fields(self, uniqid, **kwargs): return self.handle_response( self.request(f"/orders/{uniqid}/custom_fields", "PUT", kwargs) ) ================ File: sellix/resources/payments.py ================ def create_payment(self, **kwargs): return self.handle_response( self.request("/payments", "POST", kwargs), { "oneOf": [ "url,uniqid", "invoice" ], } ) def complete_payment(self, uniqid): return self.handle_response( self.request(f"/payments/{uniqid}", "PUT") ) def delete_payment(self, uniqid): return self.handle_response( self.request(f"/payments/{uniqid}", "DELETE") ) ================ File: sellix/resources/products.py ================ def get_products(self): return self.handle_response( self.request("/products"), "products" ) def create_product(self, **kwargs): return self.handle_response( self.request("/products", "POST", kwargs), "uniqid" ) def get_product(self, uniqid): return self.handle_response( self.request(f"/products/{uniqid}"), "product" ) def update_product(self, uniqid, **kwargs): return self.handle_response( self.request(f"/products/{uniqid}", "PUT", kwargs) ) def delete_product(self, uniqid): return self.handle_response( self.request(f"/products/{uniqid}", "DELETE") ) def licensing_check(self, **kwargs): return self.handle_response( self.request(f"/products/licensing/check", "POST", kwargs), "license" ) def licensing_update_hardware_id(self, **kwargs): return self.handle_response( self.request(f"/products/licensing/hardware_id", "PUT", kwargs) ) ================ File: sellix/resources/queries.py ================ def get_queries(self): return self.handle_response( self.request("/queries"), "queries" ) def get_query(self, uniqid): return self.handle_response( self.request(f"/queries/{uniqid}"), "query" ) def reply_query(self, uniqid, **kwargs): return self.handle_response( self.request(f"/queries/reply/{uniqid}", "POST", kwargs) ) def close_query(self, uniqid): return self.handle_response( self.request(f"/queries/close/{uniqid}", "POST", []) ) def reopen_query(self, uniqid): return self.handle_response( self.request(f"/queries/reopen/{uniqid}", "POST", []) ) ================ File: sellix/resources/whitelists.py ================ def get_whitelists(self): return self.handle_response( self.request("/whitelists"), "whitelists" ) def create_whitelist(self, **kwargs): return self.handle_response( self.request("/whitelists", "POST", kwargs), "uniqid" ) def get_whitelist(self, uniqid): return self.handle_response( self.request(f"/whitelists/{uniqid}"), "whitelist" ) def update_whitelist(self, uniqid, **kwargs): return self.handle_response( self.request(f"/whitelists/{uniqid}", "PUT", kwargs) ) def delete_whitelist(self, uniqid): return self.handle_response( self.request(f"/whitelists/{uniqid}", "DELETE") ) ================ File: sellix/__init__.py ================ import requests class Sellix: from .resources.blacklist import get_blacklists, create_blacklist, get_blacklist, update_blacklist, delete_blacklist from .resources.categories import get_categories, create_category, get_category, update_category, delete_category from .resources.groups import get_groups, create_group, get_group, update_group, delete_group from .resources.coupons import get_coupons, create_coupon, get_coupon, update_coupon, delete_coupon from .resources.feedback import get_feedback, reply_feedback from .resources.orders import get_orders, get_order, update_order, issue_order_replacement from .resources.payments import create_payment, delete_payment, complete_payment from .resources.products import get_products, create_product, get_product, update_product, delete_product, licensing_check, licensing_update_hardware_id from .resources.queries import get_queries, get_query, reply_query, close_query, reopen_query from .resources.whitelists import get_whitelists, create_whitelist, get_whitelist, update_whitelist, delete_whitelist from .resources.customers import get_customers, create_customer, get_customer, update_customer from .resources.subscriptions import get_subscriptions, create_subscription, get_subscription, delete_subscription from .test import sellix_test_sdk class SellixException(Exception): def __init__(self, message, code): super().__init__(self, message, code) def __init__(self, api_key, merchant=""): self.api_key = api_key self.merchant = merchant self.api_endpoint = 'https://dev.sellix.io/v1' def handle_response(self, response, key=None): if response["status"] != 200: raise self.SellixException(response["error"], response["status"]) if not key: return None if isinstance(key, dict) and "oneOf" in key: new_response = {} for one_key in key["oneOf"]: if "," in one_key: one_key = one_key.split(',') for k in one_key: if k in response["data"]: new_response[k] = response["data"][k] elif one_key in response["data"]: return response["data"][one_key] return new_response elif key in response["data"]: return response["data"][key] def request(self, component, action="get", payload={}): headers = { "Content-Type": "application/json", "Authorization": f"Bearer {self.api_key}" } if self.merchant: headers["X-Sellix-Merchant"] = self.merchant action = getattr(requests, action.lower(), None) if action: return action(headers=headers, url=f"{self.api_endpoint}{component}", json=payload).json() ================ File: setup.py ================ from setuptools import setup, find_packages from pathlib import Path setup( name="sellix-python-sdk", version="1.0.9.1", packages=find_packages(), url='https://github.com/Sellix/python-sdk', install_requires=[ 'requests', ], long_description=(Path(__file__).parent / "README.md").read_text(), long_description_content_type='text/markdown' )
Response not available