Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML.
Из плюсов такого подхода стоит отметить вот что:
🔸 готовый, повсеместно используемый и поддерживаемый формат
🔸 простой и понятный файл, удобочитаемый для человека
🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек
Но есть и минусы
🔹 затраты времени при записи файла (кодирование данных в нужный формат строки)
🔹 затраты времени при чтении файла (декодирование данных в Python объекты)
🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...)
🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда)
🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные
Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи.
Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳.
🔸 очень быстрая запись
🔸 чтение значительно быстрей чем JSON, YAML итд
🔸 размер файла значительно меньше, так как нет разметки
🔸 можно записывать данные по мере поступления не загружая всё в память
🔸 можно извлечь любую часть данных независимо
Из минусов
🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата)
🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию.
🔹 не так-то просто создать такой файл без специальной библиотеки
В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии.
(Это не означает что нельзя записать данные разного типа, просто это будет не так удобно)
Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого
f15d cd29 a564 4578 ...
09e2 9bc4 a696 1253 ...
84e9 4de1 3b23 c24a ...
2534 5161 28e0 709d ...
...
Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла.
К чему это я? Читайте в следующем посте...
#tricks#basic
#Policy_Brief: #Ethiopia’s Banking Sector Transition to Basel II and III: Critical assessment of #NBE’s new directive
In November 2025, the National Bank of Ethiopia (NBE) issued Directive No. SBB/95/2025, transitioning the banking sector toward Basel II and III frameworks. While officials view this as a “mark of maturity,” author Hassen Mama Muse contends that “implementing such a complex system in an economy with limited data infrastructure and human capital may outweigh the perceived benefits.”
He argues the directive “grafts a highly sophisticated, Western-centric regulatory model onto a developing financial system that lacks the requisite infrastructure,” citing a global history of “technocratic failure.”
Hassen cautions that success rests on “prioritizing simplicity, transparency, and domestic economic stability over technocratic elegance,” emphasizing that for Ethiopia, “resilience must be real, not merely compliant on paper.”
https://addisstandard.com/?p=54480
News: National Bank amends #forex directive allowing international payment cards, easing FX account rules
The National Bank of #Ethiopia (#NBE) has issued a new foreign exchange directive allowing domestic banks to issue internationally recognized payment cards and introducing a series of measures aimed at easing foreign exchange administration and supporting business activity.
Directive No. FXD/04/2026, which came into force on 12 February 2026, amends the earlier foreign exchange directive issued in 2024. The central bank said the revision is intended to relax foreign exchange administration, enhance market development, and strengthen business confidence.
Among the key changes, banks are now permitted to issue internationally recognized prepaid or debit cards for foreign currency account holders & load foreign currency based on customer instructions without requiring visas or air tickets.
The directive also authorizes banks to process advance payments...
Read more: https://addisstandard.com/?p=55158
News: National Bank of #Ethiopia appoints external members to monetary policy committee
The National Bank of Ethiopia (#NBE) has announced the appointment of two external members to its Monetary Policy Committee (#MPC), saying the move is intended to strengthen analytical capacity and support evidence-based monetary policy decisions.
In a statement issued Wednesday, the central bank said the appointments were approved by the NBE Board following a presentation by the governor and are in line with the amended National Bank proclamation. The bank said including external members is aimed at enhancing the committee’s expertise and supporting well-informed policy deliberations.
According to the statement, the appointees are experienced economists with strong academic backgrounds and professional expertise in macroeconomic analysis and policy.
https://www.facebook.com/share/p/1AVni8xNvG/
News: #IMF-backed forex reforms cost #Ethiopia $2.6 billion in central bank losses
Ethiopia’s central bank, the National Bank of Ethiopia (#NBE), has recorded losses equivalent to $2.6 billion following the country’s shift from a fixed to a market-based foreign exchange regime in July 2024, according to audited financial statements cited by the #Kenyan outlet The EastAfrican.
NBE said it incurred 407.1 billion birr in foreign exchange losses during the financial year ending June 30, 2025, largely due to the revaluation of its foreign currency assets and liabilities after the exchange rate realignment. Foreign exchange losses rose sharply to 445.23 billion birr, from 38.13 billion birr the previous year.
The surge pushed the National Bank of Ethiopia’s overall operating loss to 428.56 billion birr, up from 10.51 billion birr a year earlier, and drove the Bank into a negative equity position of 380 billion birr, raising concerns over its ability to continue...
Read more: https://addisstandard.com/?p=54706
#Policy_Brief: Consolidate or Collapse: Mergers and acquisitions as strategic lifeline for #Ethiopian banks
In this policy brief, Samson Hailu contends that Ethiopia’s banking sector is entering a critical phase, as consolidation —particularly through mergers and acquisitions— shifts from a private-sector discussion to a policy priority of the #NBE under Governor Eyob Tekalign.
Although the sector has expanded to 31 banks, the #CBE continues to dominate, leaving smaller institutions vulnerable. Stress tests highlight significant capital and liquidity risks, reinforcing the author’s warning that “consolidation is not merely a strategic choice but a requirement for survival.”
He recommends that smaller “third-generation” banks form partnerships with larger private banks and endorses a “guided voluntary” approach, designed not to mandate consolidation but to facilitate market-led combination.
https://addisstandard.com/?p=56167
#Ethiopia: National Bank to phase out #gold premium, open purchases to private banks; #IMF warns exchange rate challenges hinder private investment
The National Bank of Ethiopia (#NBE) is overhauling its gold transaction procedures to reduce risks to its balance sheet and curb distortions in the banking sector, according to the International Monetary Fund’s (IMF) latest review of Ethiopia’s Extended Credit Facility (#ECF) program.
Under the new framework, the premium above international gold prices currently paid to miners will be phased out, while private banks will be allowed to participate in gold purchases.
The NBE plans to develop a detailed implementation roadmap based on a study expected by the end of March 2026. In the meantime, quality control will be strengthened through expanded and improved gold testing at all purchasing sites.
The central bank also intends to prepare a long-term exit plan from the gold market by the end of December 2026,...
Read more: https://addisstandard.com/?p=54903
News: #National_Bank lists 23 unauthorized money transfer providers, warns public against use
The National Bank of #Ethiopia (#NBE) has identified 23 unauthorized money transfer service providers and warned the public against engaging with them, according to a public notice issued on 3 April 2026.
The central bank said it has updated and published a revised list of duly licensed money transfer agents authorized to operate in Ethiopia, urging the public to verify service providers through its official website.
The entities listed as unauthorized include #Adulis Money Transfer, #Amal Express, #Bakaal Money Transfer, #Jubba Express, #Quick_Pay, #Redsea (USA), Tasa Pay.
In late December 2025 Addis Standard reported that, the National Bank of Ethiopia (NBE) published an official list of more than 100 licensed money transfer agents and cautioned the public against using unlicensed remittance services.
Read more: https://addisstandard.com/?p=56305