This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

Overview

BFS SOAP API wrapper

Simply specify the method you are interested in.

Instantiate client

from bfs import Bfs

config = {
  "bricknode": {
      "wsdl": "https://bfs1.bricknode.com/ENVIRONMENT_NAME/api/bfsapi.asmx?WSDL",
      "credentials": {
        "username": "ENVIRONMENT_USERNAME",
        "password": "ENVIRONMENT_PASSWORD"
      },
      "identifier": "ENVIRONMENT_IDENTIFIER"
    }
}

bfs = Bfs(config)

bfs.get

accounts = bfs.get(bfs.methods.GET_ACCOUNTS)

Filter using the args parameter, support for UUIDs and strings:

instrument = bfs.get(bfs.methods.GET_INSTRUMENTS, args={
    "BrickIds": ["59cc4559-7b6b-490e-816a-89ec12ed8e94"]
})

instrument = bfs.get(bfs.methods.GET_INSTRUMENTS, args={
    "ISINs": ["SE0006259594"]
})

bfs.create

Using the skip_validation_for_empty_values flag we can create a minimal object without the client protesting

person = {
    'FirstName': 'Jane',
    'LastName': 'Doe',
    'UserName': 'janedoe',
    'Password': 'janedoe.4.ever',
    'Email': '[email protected]',
    'Domain': 'Front',
    'IsNaturalPerson': True
}

created_persons = bfs.create(bfs.methods.CREATE_PERSONS, entities=[person], skip_validation_for_empty_values=True)

bfs.execute

The execute method is added for code clarity, it has the same internal requirements as create

transfer_orders = [{
        'FromAccountBrickId': 'fbce4894-5f3c-49c3-87c4-62e8f3dae52f',
        'ToAccountBrickId': 'ef403f20-dfa7-4930-9e65-409d744856f8',
        'Units': 607500,
        'Comment': 'My comment',
        'TradeDate': '2021-01-11',
        'SettlementDate': '2021-01-13',
        'ValueDate': '2021-01-11',
        'InstrumentBrickId': '142f5c35-26b3-4697-87ac-81e672280b17',
        'OverrideOwnershipChangeValidation': True
    }]

created_transfer_orders = bfs.create(bfs.methods.CREATE_INTERNAL_INSTRUMENT_TRANSFER_ORDERS, entities=transfer_orders,
                             skip_validation_for_empty_values=True)

entities = list(map(lambda o: {'InternalTransferOrderBrickId': o['BrickId']}, created_transfer_orders))
result = bfs.execute(bfs.methods.EXECUTE_INTERNAL_TRANSFER_ORDERS, entities=entities)

bfs.update

Unless we are skipping validation, Updating an object often requires posting an entire object in with valid values, even though you most likely only want to update a few completely different ones. It is then mostly helpful to get the object and then modify it.

persons = bfs.get(bfs.methods.GET_PERSONS, args={
    'BrickIds': ['6e12ec5a-89e0-4c63-a04c-32141ef90a04']
}))

update_person = persons[0]

You can then update the property you want to change, remember to define the fields you want affected. Any other fields updated will not be persisted.

update_person['Email'] = '[email protected]'

result = bfs.update(bfs.methods.UPDATE_PERSONS,
                    entities=[update_person],
                    fields={
                        'Email': True
                    })

bfs.delete

This can be used for deleting POAs and Allocation Profiles. Not supporting DeleteFile, which requires a FileInfoDelete object as input.

brick_ids = [
    '3038fc58-731b-47c4-ae55-0aada120e200',
    'a018c8f1-f3f1-4ac5-b392-a33e2167a17e'
]

result = bfs.delete(bfs.methods.DELETE_POAS, brick_ids=brick_ids)

bfs.cancel

Enables cancellation, adding an entity as WorkflowTriggerDataEntity of the cancel request.

entity = {
    'OrderNo': 123456
}

result = bfs.cancel(bfs.methods.CURRENCY_EXCHANGE_ORDER__CANCEL, entity=entity)
Owner
Nord Fondkommission AB
Nord Fondkommission AB
the objective of this project is to create a Node Js server with a Python client

Socket.io-Server-client Objective The objective of this project is to send data real time ,we use socket.io(server, client) on this project Server Nod

Reda Ennakouri 5 Mar 07, 2022
With Py-Autocrack you can crack WPA2 networks in no time.

With Py-Autocrack you can crack WPA2 networks in no time. All based on Aircrack-ng and Crunch.

Paul - FloatDesign 1 Dec 10, 2021
Autopen is a very modular tool that automates the execution of scans during a penetration test.

Autopen Autopen is a very modular tool that automates the execution of scans during a penetration test. A Nmap scan result in the form of an XML file

2 Dec 22, 2021
a decompilation of NAP36 the widevine removal software for amz and nf used by p2p groups until it stoped working due to it using expired cdm keys

NAP36 a decompilation of NAP36 the widevine removal software for amz and nf used by p2p groups until it stoped working due to it useing expired cdm ke

9 Aug 29, 2021
Aiotor - a pool of proxies, shifting on each request

Aiotor - a pool of proxies, shifting on each request

Leon 32 Dec 26, 2022
Public HTTPS access to Home Assistant with Dataplicity service

Custom component for public HTTPS access to Home Assistant with Dataplicity service. Should work on any Linux PC or ARM, not only Raspberry as Dataplicity service said. Don't work on Windows.

Alex X 70 Oct 03, 2022
EV: IDS Evasion via Packet Manipulation

EV: IDS Evasion via TCP/IP Packet Manipulation 中文文档 Introduction EV is a tool that allows you crafting TCP packets and leveraging some well-known TCP/

256 Dec 08, 2022
Arp Spoofer using Python 3.

ARP Spoofer / Wifi Killer By Auax Run: Run the application with the following command: python3 spoof.py -t target_ip_address -lh host_ip_address I

Auax 6 Sep 15, 2022
Home Assistant integration for MyEnergi devices

myenergi for Home Assistant myenergi custom component for Home Assistant This is a very early release, will add more documentations soon! This compone

Johan Isacsson 70 Dec 18, 2022
An curated collection of awesome resources about networking in cybersecurity

An ongoing curated collection of awesome software, libraries, frameworks, talks & videos, best practices, learning tutorials and important practical resources about networking in cybersecurity

Paul Veillard, P. Eng 7 Nov 30, 2022
HTTP proxy pool server primarily meant for evading IP whitelists

proxy-forwarder HTTP proxy pool server primarily meant for evading IP whitelists. Setup Create a file named proxies.txt and fill it with your HTTP pro

h0nda 2 Feb 19, 2022
Repo for investigation of timeouts that happens with prolonged training on clients

Flower-timeout Repo for investigation of timeouts that happens with prolonged training on clients. This repository is meant purely for demonstration o

1 Jan 21, 2022
msgspec is a fast and friendly implementation of the MessagePack protocol for Python 3.8+

msgspec msgspec is a fast and friendly implementation of the MessagePack protocol for Python 3.8+. In addition to serialization/deserializat

Jim Crist-Harif 414 Jan 06, 2023
Simple app that redirect fixed URL to changing URL, configurable via POST requests

This is a basic URL redirection service. It stores associations between apps and redirection URLs, for apps with changing URLs. You can then use GET r

Maxime Weyl 2 Jan 28, 2022
Simple self-hosted server to receive files from remote systems

Badtray This is a very simple self-hosted server to receive files from remote systems. This works similar to Bintray (RIP) and primarily designed to d

Alex Taradov 1 Nov 22, 2021
Usbkill - an anti-forensic kill-switch that waits for a change on your USB ports and then immediately shuts down your computer.

Usbkill - an anti-forensic kill-switch that waits for a change on your USB ports and then immediately shuts down your computer.

Hephaestos 4.1k Dec 30, 2022
A simple framwork to streamline the Domain Adaptation training process.

FastDA Introduction This is a simple framework for domain adaptation training. You can use it to build your own training process. It heavily relies on

Vincent Zhang 7 Nov 22, 2022
Mini SCADA. Poll modbus devices by TCP/IP network.

Plans Add saving and loading devices and channels with files or db or someone else. Multitasking system for poll all devices Automatic optimization po

Efi_fi 1 Oct 25, 2021
A simple python script to send cute messages to my boyfriend.

Morning Messages A simple python script to send cute messages to my boyfriend. It gives him the weather and news currently. Installation git clone htt

Sabrina Medwinter 3 Oct 12, 2022
Program can control your server via discord bot

GTPS Controller Program can control your server via discord bot Require Python How To Use Download This Source Extract The Zip File Paste gtps.py to y

Lamp 2 Mar 15, 2022