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
API to establish connection between server and client

Socket-programming API to establish connection between server and client, socket.socket() creates a socket object that supports the context manager ty

Muziwandile Nkomo 1 Oct 30, 2021
An ansible playbook to set up wireguard server.

Poor man's VPN (pay for only what you need) An ansible playbook to quickly set up Wireguard server for occasional personal use. It takes around five m

Amrit Bera 613 Dec 25, 2022
mitm6 is a pentesting tool that exploits the default configuration of Windows to take over the default DNS server.

mitm6 is a pentesting tool that exploits the default configuration of Windows to take over the default DNS server.

Fox-IT 1.3k Jan 05, 2023
A Simplest TCP client and echo server

Простейшие TCP-клиент и эхо-сервер Цель работы Познакомиться с приемами работы с сетевыми сокетами в языке программирования Python. Задания для самост

Юля Нагубнева 1 Oct 25, 2021
Ping IP addresses and domains in parallel to find the accessible and inaccessible ones.

🚀 IPpy Parallel testing of IP addresses and domains in python. Reads IP addresses and domains from a CSV file and gives two lists of accessible and i

Shivam Mathur 54 May 21, 2022
Query protocol and response

whois Query protocol and response _MᵃˢᵗᵉʳBᵘʳⁿᵗ_ _ ( ) _ ( )( ) _ | | ( ) | || |__ _ (_) ___ | | | | | || _ `\ /'_`\ | |/',__) |

MasterBurnt 4 Sep 05, 2021
Initial code of an A3C network

A3C-network Initial code of an A3C network Open the python file named as "APL452 Project Report2" The following libraries and packages have been insta

Ayush Tanwar 0 Jun 11, 2022
The Delegate Network: An Interactive Voice Response Delegative Democracy Implementation of Liquid Democracy

The Delegate Network Overview The delegate network is a completely transparent, easy-to-use and understand version of what is sometimes called liquid

James Bowery 2 Feb 25, 2022
StarCraft II Client - protocol definitions used to communicate with StarCraft II.

Overview The StarCraft II API is an interface that provides full external control of StarCraft II. This API exposes functionality for developing softw

Blizzard Entertainment 3.6k Dec 30, 2022
This is a Client-Server-System which can send audio from a microphone from the server to client and in the other direction.

Audio-Streaming-Python This is a Client-Server-System which can send audio from a microphone from the server to client and in the other direction. You

VFX / Videoeffects Creator 0 Jan 05, 2023
AdaFruit Funhouse publishing Temperature, Humidity and Pressure to MQTT / Apache Pulsar

pulsar-adafruit-funhouse AdaFruit Funhouse publishing Temperature, Humidity and Pressure to MQTT / Apache Pulsar Device Get your own from adafruit Ada

Timothy Spann 1 Dec 30, 2021
tradingview socket api for fetching real time prices.

tradingView-API tradingview socket api for fetching real time prices. How to run git clone https://github.com/mohamadkhalaj/tradingView-API.git cd tra

MohammadKhalaj 35 Dec 31, 2022
Dshell is a network forensic analysis framework.

Dshell An extensible network forensic analysis framework. Enables rapid development of plugins to support the dissection of network packet captures. K

DEVCOM Army Research Laboratory 5.4k Jan 06, 2023
E4GL3OS1NT - Simple Information Gathering Tool

E4GL30S1NT Features userrecon - username reconnaissance facedumper - dump facebook information mailfinder - find email with specific name godorker - d

C0MPL3XDEV 195 Dec 21, 2022
Minimal, self-hosted, 0-config alternative to ngrok. Caddy+OpenSSH+50 lines of Python.

If you have a webserver running on one computer (say your development laptop), and you want to expose it securely (ie HTTPS) via a public URL, SirTunnel allows you to easily do that.

Anders Pitman 423 Jan 02, 2023
Terminal based chat - networking project with sockets in python

Terminal based chat - networking project with sockets in python

2 Jan 24, 2022
Start a simple TCP Listener on a specified IP Address and Port Number and receive incoming connections.

About Start a simple TCP Listener on a specified IP Address and Port Number and receive incoming connections. Download Clone using git in terminal(git

AgentGeneric 5 Feb 24, 2022
A Cheap Flight Alert program sends you a SMS to notify cheap flights in next 8 months.

Flight Dealer A Cheap Flight Alert program sends you a SMS to notify cheap flights (return trips) in next 6 months. Installing Download the Python 3 i

Aytaç Kaşoğlu 2 Feb 10, 2022
This program ingests a Cisco "sh ip arp" as a text file and produces the list of vendors seen in the file

IP-ARP-Vendor_lookup This program ingests a Cisco "sh ip arp" as a text file and produces the list of vendors seen in the file Why? Answers the questi

Stew Alexander 1 Dec 24, 2022
Discord RPC Generator With Python

Discord-RPC-Generator Thank you for using this Discord Custom RP Generator. This is 100% safe and open source. Download Discord for your computer here

1 Nov 09, 2021