Skip to main content

App for salla common lib

Project description

Salla Common Lib

A comprehensive Python library for Salla e-commerce platform integration with Frappe/ERPNext systems.

Installation

You can install the package using pip:

pip install salla-common-lib

Features

Core Functionality

  • Product Management: Comprehensive item and variant synchronization with Salla
  • Inventory Sync: Real-time inventory quantity updates between ERPNext and Salla
  • Order Processing: Advanced order management and processing capabilities
  • Event Handling: Robust event system for item updates, price changes, and order workflows
  • Multi-Merchant Support: Support for multiple Salla merchants from a single ERPNext instance

Key Modules

Utils (salla_common_lib.utils)

  • update_product_balance_warehouse(): Updates product quantities in Salla based on warehouse balance
  • update_variant_qty(): Manages variant-specific quantity updates
  • get_salla_defaults(): Retrieves merchant-specific Salla configuration
  • get_pos_profile(): POS profile management for Salla transactions

Event Management (salla_common_lib.event)

  • Item Events: Handle item creation, updates, and variant management
  • Price Events: Manage pricing synchronization
  • Order Events: Process Salla orders and fulfillment
  • Field Management: Dynamic field handling for Salla integration

Integration Support

Compatible with both:

  • salla_connector app
  • salla_client app

Usage

Basic Item Synchronization

from salla_common_lib.utils import update_product_balance_warehouse

# Update product quantities for a specific merchant
update_product_balance_warehouse(
    merchant_name="your_merchant",
    item="ITEM-001",
    is_bulk=False
)

Variant Management

from salla_common_lib.utils import update_variant_qty

# Update variant quantity
update_variant_qty(
    item_variant="ITEM-001-RED-L",
    merchant_name="your_merchant",
    salla_item_info_name="salla_item_info_name"
)

Event Hooks

The library provides automatic event handling for:

  • Item before_save and on_update events
  • Price synchronization events
  • Order processing workflows

Configuration

Prerequisites

  • Frappe/ERPNext instance
  • Salla merchant account and API credentials
  • Warehouse configuration for inventory sync

Setup

  1. Install the library in your Frappe environment
  2. Configure Salla Merchant settings
  3. Set up Salla Sync Job with warehouse mapping
  4. Configure Salla Defaults for each merchant

API Integration

The library seamlessly integrates with Salla's API v2:

  • Base URL: https://api.salla.dev/admin/v2
  • Supports bulk operations for improved performance
  • Handles authentication and error management

Requirements

  • Python >= 3.10
  • Frappe Framework
  • Active Salla merchant account

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For support and questions, contact: info@golive-solutions.com

Changelog

Version 0.0.7

  • Enhanced README documentation
  • Improved API integration support
  • Better error handling and validation

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

salla_common_lib-0.0.18.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

salla_common_lib-0.0.18-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file salla_common_lib-0.0.18.tar.gz.

File metadata

  • Download URL: salla_common_lib-0.0.18.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for salla_common_lib-0.0.18.tar.gz
Algorithm Hash digest
SHA256 3f3f601cfbdb7b60c7c74a6e5040098b78ae484236b6ea85e4eeb26b0ba7e45b
MD5 554f59dff1301846bfd486b3a1c8efff
BLAKE2b-256 2d93719e3f3dc85aaf697f8aaa59b83d4fcdf175b8a6fce2ff3e1955d111b0ce

See more details on using hashes here.

File details

Details for the file salla_common_lib-0.0.18-py3-none-any.whl.

File metadata

File hashes

Hashes for salla_common_lib-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 6508be9755edaa6d1ce00eacf64d1fad5a4f5e359fa3099083a2d55f42e514d0
MD5 7b11a6e0b093d8851a68c0316517816d
BLAKE2b-256 8868bca4fe3742db94040214ff320e4006175941102d5b96bbf7aba5608a05c8

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