Metadata-Version: 2.5
Name: scelo
Version: 0.1.0
Summary: Scelo for Python — soft data → tools → hard data. The shortest path from a messy extract to a board-pack number, for actuaries who write code.
Project-URL: Homepage, https://github.com/intelligentactuaries/scelo
Project-URL: Documentation, https://docs.intelligentactuaries.com/scelo/
Project-URL: Repository, https://github.com/intelligentactuaries/scelo
Project-URL: Issues, https://github.com/intelligentactuaries/scelo/issues
Author-email: "Intelligent Actuaries (Pty) Ltd" <scelo@intelligentactuaries.com>
License: Scelo IDE Source-Available License Agreement
        Version 1.1 — Effective Date: 27 May 2026
        
        SPDX-License-Identifier: LicenseRef-Scelo-IDE-1.1
        
        Copyright (c) 2026 Intelligent Actuaries (Pty) Ltd and its contributors.
        All rights reserved.
        
        
        ────────────────────────────────────────────────────────────────────────
        NOT LEGAL ADVICE. This document is the licensing instrument governing
        the Scelo IDE software. It is not legal advice. Before adopting or
        relying on this License, You should consult independent legal counsel
        in Your jurisdiction. Intelligent Actuaries (Pty) Ltd recommends that
        all parties, Licensor and Licensee alike, obtain such advice.
        ────────────────────────────────────────────────────────────────────────
        
        
        ────────────────────────────────────────────────────────────────────────
        PRICING SUMMARY (non-binding; the operative text begins at Section 1)
        ────────────────────────────────────────────────────────────────────────
        
          In the interest of transparency, the pricing model is published in
          full and applies on identical terms to every licensee worldwide.
        
          • You may install, run, modify, fork, and use Scelo IDE for any
            purpose, including building commercial products and services.
            There is no fee for using the Software itself.
        
          • For each product, service, model, dataset, application, or other
            distributable artefact that You build or substantially produce
            using Scelo IDE (each, a "Licensed Product"), the first
            ZAR 1,000,000 of that Licensed Product's lifetime Gross Revenue
            is royalty-free.
        
          • Above that per-Product threshold, You owe Intelligent Actuaries
            a flat royalty of three percent (3%) of that Licensed Product's
            Gross Revenue in excess of ZAR 1,000,000, for the lifetime of the
            Licensed Product.
        
          • Nanoeconomics-for-poverty research and direct-delivery work
            conducted under the published Nanoeconomics Methodology remains
            free without revenue limit, conditional on the public annual
            report described in Section 3.
        
          • Misrepresentation of revenue, of affiliates, or of carve-out
            eligibility triggers retroactive back-charge plus the Licensor's
            legal costs (Section 8).
        
          Where this summary and the operative text below conflict, the
          operative text governs.
        
        ────────────────────────────────────────────────────────────────────────
        
        
        This License governs Your use of the Scelo IDE software, including the
        desktop application, its installer artefacts, its accompanying sample
        workspace templates, its bundled scripts, and the source code in the
        `apps/scelo-ide/` directory and `apps/web/` directory of the
        Intelligent Actuaries monorepo (collectively, the "Software"). By
        downloading, installing, copying, accessing, executing, embedding,
        modifying, or otherwise using the Software, You agree to be bound by
        these terms. If You do not agree, You must not use the Software.
        
        This License is global in scope. The rights granted in Sections 2 and
        3 are available to any natural or legal person, anywhere in the world,
        on identical terms. The Licensor is incorporated in the Republic of
        South Africa, and this License is governed by South African law (see
        Section 13), but the License itself is intended for international use:
        the per-Product royalty gate in Section 2 and Section 4 applies
        worldwide via the currency conversion mechanic in Section 1.5, and the
        Nanoeconomics carve-out in Section 3 is available to researchers and
        practitioners in every jurisdiction.
        
        This License is independent of the Intelligent Actuaries License v1.0
        (`LICENSE` at the repository root). Where this License and IA v1.0
        would both apply to the Software, this License governs. Where this
        License is silent, IA v1.0 fills the gap by analogy, but only to the
        extent consistent with the terms below.
        
        It is a source-available, royalty-bearing license measured on a
        per-Product basis, with a dedicated free-use carve-out for
        nanoeconomics research conducted for poverty eradication. It is NOT an
        Open Source Initiative–approved open-source license.
        
        
        ────────────────────────────────────────────────────────────────────────
        1.  DEFINITIONS
        ────────────────────────────────────────────────────────────────────────
        
        1.1  "Affiliate" means, with respect to any entity, any other entity
             that directly or indirectly controls, is controlled by, or is
             under common control with that entity. "Control" means ownership
             of fifty percent (50%) or more of the voting securities or the
             power to direct the management of the entity.
        
        1.2  "Annual Report" means the public-facing self-attested report
             described in Section 3 (Nanoeconomics carve-out) or, in the
             context of Section 4, the annual royalty report described in
             Section 4.4. The context indicates which is meant.
        
        1.3  "Commercial Use" means any use of the Software in the design,
             development, training, evaluation, deployment, distribution, or
             operation of a Licensed Product.
        
        1.4  "Eligible Nanoeconomics Use" has the meaning given in Section 3.
        
        1.5  "Gross Revenue", in respect of a Licensed Product, means all
             worldwide revenue earned by You and Your Affiliates in aggregate,
             in respect of that Licensed Product, from any source whatsoever
             and measured before any deduction (including but not limited to
             refunds, chargebacks, taxes, distribution fees, hosting costs,
             payment-processor fees, or cost of goods sold). It includes
             subscription fees, one-time purchase fees, in-app purchases,
             advertising revenue attributable to the Licensed Product,
             sponsorship revenue attributable to the Licensed Product,
             consulting or service fees where the Licensed Product is the
             subject of the engagement, license fees and royalties received
             from sub-distributors, and the fair market value of any non-cash
             consideration received in connection with the Licensed Product.
             Gross Revenue is computed in South African Rand (ZAR). Revenue
             earned in any other currency is converted to ZAR at the spot
             exchange rate published by the South African Reserve Bank on the
             last business day of the fiscal year in which that revenue was
             earned, or, if such rate is not available, the applicable
             mid-market rate published by a major international financial
             data provider on that date.
        
        1.6  "Licensed Product" means any product, service, application,
             model, dataset, software library, simulation, report, or other
             distributable, sold, licensed, or revenue-generating artefact
             that You or Your Affiliates create, distribute, license, host,
             or otherwise commercialise, where the Software was used in the
             design, development, training, evaluation, or production of that
             artefact in any non-trivial way. Use is non-trivial if removing
             the Software from the development process would have required
             material additional work, cost, or time. Internal-only artefacts
             that are never distributed and never used to generate revenue
             are not Licensed Products.
        
             For the avoidance of doubt, Licensed Products are counted
             individually: separate products, services, or service-tiers
             constitute separate Licensed Products even where they share
             code, models, or branding, unless they are functionally a single
             offering distinguished only by packaging or pricing. The
             Licensor and Licensee shall, in case of doubt, resolve product
             boundaries by reference to how the Licensee presents the
             offering(s) to its customers in the ordinary course.
        
        1.7  "Licensor" means Intelligent Actuaries (Pty) Ltd, a private
             company incorporated under the laws of the Republic of South
             Africa, and its lawful assignees.
        
        1.8  "Nanoeconomics Methodology" means the body of work published by
             the Licensor under the name "Nanoeconomics", including its
             definitions, methods, boundary conditions, simulators, and
             reproducible artefacts, as those works exist from time to time
             on the Licensor's public research surfaces (including
             intelligentactuaries.com, the public GitHub organisation
             intelligentactuaries, and the public Hugging Face organisation
             intelligentactuaries). Where a specific publication is cited in
             an Annual Report, that publication is the governing reference
             for that report.
        
        1.9  "Revenue Threshold" means South African Rand one million
             (ZAR 1,000,000.00) of lifetime Gross Revenue, in respect of a
             single Licensed Product, aggregated across You and Your
             Affiliates and across all fiscal years in which that Licensed
             Product has earned revenue.
        
        1.10 "Royalty Rate" means three percent (3.00%).
        
        1.11 "Software" has the meaning given in the opening paragraphs.
        
        1.12 "You" (or "Your") means the individual or legal entity exercising
             rights under this License. If You exercise such rights on behalf
             of an entity, You represent that You have authority to bind that
             entity, and "You" includes that entity and its Affiliates.
        
        
        ────────────────────────────────────────────────────────────────────────
        2.  GRANT OF LICENSE
        ────────────────────────────────────────────────────────────────────────
        
        2.1  The Licensor grants You a worldwide, non-exclusive, royalty-free,
             non-transferable, revocable license to:
        
             (a)  install, execute, and use the Software for any lawful
                  purpose, including Commercial Use and including the design,
                  development, training, evaluation, and operation of
                  Licensed Products;
        
             (b)  modify, fork, and create derivative works of the Software
                  for Your own internal use; and
        
             (c)  copy and redistribute the Software, in source or binary
                  form, with or without modification, provided that every
                  copy preserves this License in full, the copyright notice,
                  and the attribution required by Section 6.
        
        2.2  The rights in Section 2.1 are royalty-free with respect to use
             of the Software itself. They are conditional on Your continued
             compliance with this License, including the per-Product royalty
             obligation in Section 4 where a Licensed Product crosses the
             Revenue Threshold.
        
        2.3  Nothing in this Section terminates the license merely because a
             Licensed Product earns revenue. The license continues; a royalty
             obligation under Section 4 attaches in addition.
        
        
        ────────────────────────────────────────────────────────────────────────
        3.  ELIGIBLE NANOECONOMICS USE — FREE WITHOUT REVENUE LIMIT
        ────────────────────────────────────────────────────────────────────────
        
        3.1  Notwithstanding Section 4, You may use the Software for any
             "Eligible Nanoeconomics Use" without regard to the Revenue
             Threshold, and at no royalty, provided that every condition in
             Sections 3.2 through 3.4 is met and remains met.
        
        3.2  "Eligible Nanoeconomics Use" means use of the Software:
        
             (a)  for research, simulation, policy design, programme
                  delivery, or other activity directed at the eradication of
                  poverty;
        
             (b)  conducted in substantial reliance on the Nanoeconomics
                  Methodology, including its published definitions, methods,
                  boundary conditions, and reproducibility requirements as
                  they appear on the Licensor's public research surfaces from
                  time to time; and
        
             (c)  not used as a wrapper around a commercial product or
                  service whose primary purpose is something other than the
                  Eligible Nanoeconomics Use described above. The carve-out
                  covers research and direct-delivery work; it does not cover
                  ordinary commercial activity that incidentally cites the
                  Nanoeconomics Methodology.
        
        3.3  You shall publish, no later than sixty (60) days after the end of
             each calendar year in which You exercised the rights granted by
             this Section, an Annual Report that:
        
             (a)  identifies You and any Affiliates relying on this carve-out;
        
             (b)  identifies the specific Nanoeconomics Methodology
                  publication(s) on which the work is based, by title, version
                  or revision identifier, and URL;
        
             (c)  summarises the work undertaken, including its scope,
                  population reached, geography, period covered, and the
                  outcome metrics You used to evaluate it;
        
             (d)  states honestly any departures from the Nanoeconomics
                  Methodology and the reasons for them; and
        
             (e)  is published in full on a public web surface under Your
                  control, or, where that is not possible, attached to the
                  submission described in Section 3.4.
        
        3.4  You shall submit the Annual Report by electronic mail to BOTH of
             the following addresses simultaneously:
        
                  scelo@intelligentactuaries.com
                  nanoeconomics@scelo.ai
        
             Submission is by transmission. The Licensor is not required to
             review, approve, or acknowledge the Annual Report. The Licensor
             reserves the right to publish the list of submitting parties on
             its public research surfaces.
        
        3.5  The carve-out lapses, with respect to a given calendar year, if
             no Annual Report meeting the requirements above has been
             submitted within the deadline. A lapse does not retroactively
             invalidate prior years' compliance, but it does revert You to
             the Section 4 royalty regime for the year of lapse and every
             subsequent year, until a fresh Annual Report restores Eligible
             Nanoeconomics Use status.
        
        
        ────────────────────────────────────────────────────────────────────────
        4.  ROYALTY OBLIGATION ON LICENSED PRODUCTS
        ────────────────────────────────────────────────────────────────────────
        
        4.1  The first ZAR 1,000,000 of lifetime Gross Revenue earned in
             respect of any single Licensed Product is royalty-free.
        
        4.2  Once a Licensed Product's lifetime Gross Revenue, aggregated
             across You and Your Affiliates and across all fiscal years,
             equals or exceeds the Revenue Threshold, You shall pay to the
             Licensor a royalty equal to the Royalty Rate (three percent,
             3.00%) of every additional ZAR of Gross Revenue earned by that
             Licensed Product, for the lifetime of the Licensed Product. The
             royalty applies only to Gross Revenue in excess of ZAR 1,000,000;
             the first ZAR 1,000,000 remains royalty-free in perpetuity.
        
        4.3  Royalties accrue at the moment Gross Revenue is earned. They are
             due and payable annually in arrears, no later than ninety (90)
             days after the end of Your fiscal year in which the relevant
             Gross Revenue was earned. Payment shall be made in ZAR by
             electronic transfer to bank-account details provided by the
             Licensor on written request to legal@intelligentactuaries.com.
        
        4.4  Within the same ninety (90) day window, You shall submit a
             royalty report to legal@intelligentactuaries.com (with a courtesy
             copy to scelo@intelligentactuaries.com) that, for each Licensed
             Product that has crossed the Revenue Threshold:
        
             (a)  identifies the Licensed Product by name and description;
        
             (b)  states the fiscal year covered;
        
             (c)  states the Gross Revenue earned by that Licensed Product in
                  the fiscal year, in its original currency or currencies,
                  and the ZAR-equivalent amount computed under Section 1.5;
        
             (d)  states the cumulative lifetime Gross Revenue of the
                  Licensed Product through the end of that fiscal year;
        
             (e)  states the royalty amount due in respect of that fiscal
                  year (3% of the portion of Gross Revenue in excess of
                  ZAR 1,000,000); and
        
             (f)  identifies the Affiliates whose revenue is included.
        
             The royalty report shall be self-attested by an officer or
             equivalent authorised representative of the Licensee.
        
        4.5  The Licensor may, no more than once per Licensed Product per
             fiscal year, request reasonable supporting documentation of the
             figures in a royalty report. You shall provide such documentation
             within thirty (30) days of the request, redacted only to the
             extent necessary to protect customer-identifying information or
             other lawfully confidential material.
        
        4.6  Affiliate aggregation is mandatory. Revenue earned in respect of
             a Licensed Product by any of Your Affiliates is included in that
             Licensed Product's Gross Revenue, regardless of contractual,
             accounting, or legal structuring. The Licensee that first
             adopted this License in respect of a Licensed Product is jointly
             and severally liable, with its Affiliates, for the royalty due
             on that Licensed Product.
        
        4.7  An election to enter into a Commercial License under Section 5
             supersedes the royalty obligation in this Section for the
             Licensed Product(s) covered by that Commercial License, for the
             term of that Commercial License.
        
        
        ────────────────────────────────────────────────────────────────────────
        5.  COMMERCIAL LICENSE (OPTIONAL ALTERNATIVE)
        ────────────────────────────────────────────────────────────────────────
        
        5.1  The royalty regime in Section 4 is the default and applies to
             all Licensees by operation of this License. As an alternative,
             You may, at Your election, negotiate a Commercial License with
             the Licensor that supersedes Section 4 for the Licensed
             Product(s) and term agreed in writing. Typical reasons to
             negotiate a Commercial License include: preferring a fixed
             annual fee over a variable royalty, requesting expanded rights
             (for example, sublicensing or rebranding rights not otherwise
             granted), or requesting a support and service level.
        
        5.2  Commercial Licenses are granted on negotiated, written terms.
             Pricing, scope, term, support level, and any other commercial
             matters are agreed between the Licensor and the Commercial
             Licensee, and supersede this License for the duration of the
             Commercial Licence, with respect to the Licensed Product(s)
             covered.
        
        5.3  Enquiries: legal@intelligentactuaries.com.
        
        
        ────────────────────────────────────────────────────────────────────────
        6.  ATTRIBUTION
        ────────────────────────────────────────────────────────────────────────
        
        6.1  Every copy of the Software, in source or binary form, shall
             include a clearly visible attribution to "Scelo IDE, Intelligent
             Actuaries (Pty) Ltd" together with a URL pointing to the
             Licensor's public repository (currently
             https://github.com/intelligentactuaries/intelligentactuaries).
        
        6.2  Derivative works shall further include a notice identifying the
             changes made and the date thereof, and shall not represent
             themselves as the unmodified Scelo IDE.
        
        
        ────────────────────────────────────────────────────────────────────────
        7.  PROHIBITED ACTS
        ────────────────────────────────────────────────────────────────────────
        
        You shall not, and shall not permit any third party to:
        
        (a)  remove, obscure, or alter any copyright, attribution, or
             licensing notice in the Software;
        
        (b)  represent that the Software, or any derivative thereof, is
             endorsed or certified by the Licensor unless a separate written
             agreement says so;
        
        (c)  use the Software in a manner that violates applicable law,
             regulatory requirements, or third-party rights;
        
        (d)  use the Software to design, train, evaluate, or deploy any system
             intended to cause physical or psychological harm, or to evade
             consumer-protection, anti-discrimination, or actuarial-
             soundness requirements that would otherwise apply to a regulated
             product;
        
        (e)  reverse-engineer or circumvent any technical protection measure
             embedded in the Software, except to the extent applicable law
             expressly prohibits such restriction;
        
        (f)  misrepresent the Gross Revenue of any Licensed Product, the
             identity or scope of Your Affiliates, the boundaries between
             Licensed Products, the Eligible Nanoeconomics Use claimed, the
             contents of an Annual Report or royalty report, or any other
             fact material to Your rights or obligations under this License;
             or
        
        (g)  structure Your operations, Your contractual relationships, Your
             product packaging, or Your reporting practices for the purpose
             of avoiding the Revenue Threshold, depressing reported per-
             Product Gross Revenue, fragmenting one functional Licensed
             Product into multiple nominal ones, or otherwise defeating the
             royalty mechanic in Section 4 or the conditions in Section 3.
        
        
        ────────────────────────────────────────────────────────────────────────
        8.  ABUSE — REMEDIES AND BACK-CHARGE
        ────────────────────────────────────────────────────────────────────────
        
        8.1  If You materially breach this License, including without
             limitation by failing to pay royalties due under Section 4, by
             failing to submit a royalty report by its deadline, by claiming
             Eligible Nanoeconomics Use without meeting its conditions, or by
             committing any act in Section 7, this License terminates
             automatically and without notice with respect to the Licensed
             Product(s) in breach.
        
        8.2  Upon termination under Section 8.1, in addition to any cessation
             of use that follows from termination, You shall pay to the
             Licensor the unpaid royalties due under Section 4 in respect of
             the Licensed Product(s) in breach, computed retroactively from
             the date the Licensed Product first crossed the Revenue
             Threshold (or, in cases involving misrepresentation, from the
             date the misrepresentation began), together with compound
             interest at the prevailing prime lending rate published by the
             South African Reserve Bank plus three percentage points,
             accruing from the date each unpaid royalty fell due.
        
             You shall additionally pay the Licensor's reasonable legal
             costs, including attorneys' fees and disbursements, incurred in
             connection with detecting, documenting, and enforcing the
             breach.
        
        8.3  The remedies in Section 8.2 are cumulative with any other remedy
             available to the Licensor at law or in equity, including
             injunctive relief and damages for misrepresentation. Nothing in
             this License limits the Licensor's right to seek specific
             performance, to seek criminal sanctions where applicable
             (including for fraud, theft, or misrepresentation under the laws
             of the Republic of South Africa), or to publish the fact of the
             breach.
        
        8.4  Inadvertent or de minimis breaches, including a late royalty
             report, a clerical error in revenue reporting, a late Nanoeconomics
             Annual Report, or a good-faith misunderstanding of these terms,
             may, at the Licensor's sole discretion, be cured by the breaching
             party within thirty (30) days of written notice from the Licensor,
             in which case Sections 8.1 and 8.2 do not apply.
        
        
        ────────────────────────────────────────────────────────────────────────
        9.  INBOUND = OUTBOUND (CONTRIBUTOR TERMS)
        ────────────────────────────────────────────────────────────────────────
        
        By submitting any contribution to the Software (whether by pull
        request, patch, issue attachment, or otherwise), You agree that the
        contribution is licensed to the Licensor and to all subsequent
        licensees under this License. You grant the Licensor a perpetual,
        worldwide, non-exclusive, royalty-free, irrevocable license to
        reproduce, prepare derivative works of, sublicense (including under a
        Commercial License), publicly display, publicly perform, and
        distribute the contribution. You represent that You have the legal
        right to make the contribution under these terms.
        
        
        ────────────────────────────────────────────────────────────────────────
        10. DISCLAIMER OF WARRANTY
        ────────────────────────────────────────────────────────────────────────
        
        THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY
        OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY
        WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE,
        NON-INFRINGEMENT, ACCURACY, OR ABSENCE OF ERRORS. WITHOUT LIMITING THE
        GENERALITY OF THE FOREGOING, THE LICENSOR DOES NOT WARRANT THAT THE
        SOFTWARE WILL MEET YOUR REQUIREMENTS, THAT ITS OPERATION WILL BE
        UNINTERRUPTED OR ERROR-FREE, OR THAT ANY OUTPUT IT PRODUCES WILL BE
        ACTUARIALLY SOUND, REGULATORILY COMPLIANT, OR FIT FOR ANY PARTICULAR
        DECISION. You assume the entire risk arising out of Your use of the
        Software.
        
        
        ────────────────────────────────────────────────────────────────────────
        11. LIMITATION OF LIABILITY
        ────────────────────────────────────────────────────────────────────────
        
        11.1 To the maximum extent permitted by applicable law, the Licensor
             shall not be liable for any indirect, incidental, special,
             consequential, exemplary, or punitive damages, or for any loss
             of profits, revenue, data, business, goodwill, or use, arising
             out of or in connection with this License or the Software,
             regardless of the cause of action and regardless of whether the
             Licensor has been advised of the possibility of such damages.
        
        11.2 The Licensor's aggregate liability arising out of or in
             connection with this License shall not exceed the greater of
             (i) the royalties actually paid by You to the Licensor under
             Section 4, or the amounts actually paid by You to the Licensor
             under any applicable Commercial License, during the twelve (12)
             months preceding the event giving rise to the claim, or
             (ii) one thousand South African Rand (ZAR 1,000.00), or its
             equivalent in any other currency at the spot rate referenced in
             Section 1.5 on the date the claim arises.
        
        11.3 Nothing in this License excludes or limits liability to the
             extent that exclusion or limitation is prohibited by applicable
             law (including liability for gross negligence, wilful misconduct,
             or death or personal injury caused by negligence).
        
        
        ────────────────────────────────────────────────────────────────────────
        12. INDEMNIFICATION
        ────────────────────────────────────────────────────────────────────────
        
        You shall indemnify, defend, and hold harmless the Licensor and its
        officers, directors, employees, and contractors from and against any
        and all third-party claims, liabilities, losses, damages, and expenses
        (including reasonable attorneys' fees) arising out of or relating to
        (a) Your use of the Software, (b) Your breach of this License,
        (c) Your violation of any law or regulation, or (d) Your infringement
        of any third-party right.
        
        
        ────────────────────────────────────────────────────────────────────────
        13. GOVERNING LAW AND DISPUTE RESOLUTION
        ────────────────────────────────────────────────────────────────────────
        
        13.1 Governing Law. This License is governed by and construed in
             accordance with the laws of the Republic of South Africa, without
             regard to its conflict-of-laws principles. The choice of South
             African law is administrative: the Licensor is incorporated
             there. It is not intended to and does not restrict the global
             scope of the rights granted in Sections 2 and 3, which are
             available to any person worldwide on identical terms.
        
        13.2 International Arbitration (default). Any dispute, controversy,
             or claim arising out of or in connection with this License shall
             be finally resolved by arbitration under the Rules of Arbitration
             of the International Chamber of Commerce (ICC) by one or more
             arbitrators appointed in accordance with those Rules. The seat
             of arbitration shall be Johannesburg, South Africa, unless the
             parties agree in writing on another seat. The language of the
             arbitration shall be English. The arbitral award shall be final
             and binding on the parties and may be enforced in any court of
             competent jurisdiction.
        
        13.3 Small-Claims Carve-Out. Notwithstanding Section 13.2, either
             party may bring an action in the small-claims (or equivalent
             lowest-jurisdiction) court of the defending party's principal
             place of business for matters within that court's monetary and
             subject-matter jurisdiction.
        
        13.4 Licensor's IP-Enforcement Carve-Out. Notwithstanding the
             foregoing, the Licensor may, at its sole election, bring
             proceedings in any court of competent jurisdiction anywhere in
             the world to (i) enforce its intellectual-property rights,
             (ii) obtain interim or injunctive relief, or (iii) pursue
             remedies for breaches of Sections 7 (Prohibited Acts) or 8
             (Abuse). For these purposes, "court of competent jurisdiction"
             includes the courts of the country in which You reside, are
             domiciled, do business, host infringing copies of the Software,
             or hold assets.
        
        13.5 Recognition of Awards. The parties acknowledge and rely on the
             Convention on the Recognition and Enforcement of Foreign
             Arbitral Awards (New York, 1958) for the cross-border
             enforcement of any arbitral award rendered under Section 13.2.
        
        13.6 No Forum Selection Against Consumers. Where applicable consumer-
             protection law (in any jurisdiction) grants a natural-person
             user the right to bring proceedings in the courts of that user's
             country of residence, nothing in this Section restricts that
             right.
        
        
        ────────────────────────────────────────────────────────────────────────
        14. MISCELLANEOUS
        ────────────────────────────────────────────────────────────────────────
        
        14.1 Severability. If any provision of this License is held invalid
             or unenforceable, the remaining provisions remain in full force
             and effect, and the invalid provision shall be replaced with a
             valid one that most closely approximates the original intent.
        
        14.2 No Waiver. No failure or delay by the Licensor in exercising any
             right under this License shall operate as a waiver of that right.
        
        14.3 Entire Agreement. This License, together with any Commercial
             License agreed in writing between the parties, constitutes the
             entire agreement between the parties with respect to the
             Software and supersedes all prior or contemporaneous
             communications and proposals with respect to its subject matter.
        
        14.4 Amendment. The Licensor may publish revised versions of this
             License from time to time. New downloads or installations of the
             Software shall be governed by the version in effect at the time
             of acquisition. Existing licensees may continue to operate under
             the version in effect at the time they first accepted these
             terms, or migrate to the current version at their election.
        
        14.5 Notices. All notices to the Licensor under this License shall be
             sent to legal@intelligentactuaries.com, with a courtesy copy to
             scelo@intelligentactuaries.com. Notices are effective upon
             transmission and a confirmation read-receipt or acknowledgement.
        
        14.6 Assignment. You may not assign or transfer this License or any
             rights or obligations under it without the Licensor's prior
             written consent. The Licensor may assign this License freely.
        
        14.7 Language. The English-language version of this License is the
             controlling version. Translations into other languages may be
             made available for convenience, but in the event of any conflict
             the English version shall prevail.
        
        14.8 Partial Enforceability by Jurisdiction. If a court or arbitral
             tribunal of competent jurisdiction holds that any provision of
             this License is unenforceable in that jurisdiction, Your rights
             in that jurisdiction shall continue to the maximum extent
             permitted by local law, and the unenforceability shall not
             affect Your rights or the Licensor's rights in any other
             jurisdiction.
        
        
        ────────────────────────────────────────────────────────────────────────
        15. CONTACT
        ────────────────────────────────────────────────────────────────────────
        
          Commercial enquiries          legal@intelligentactuaries.com
          Royalty reports & payment     legal@intelligentactuaries.com
          General Scelo enquiries       scelo@intelligentactuaries.com
          Nanoeconomics carve-out       nanoeconomics@scelo.ai
                                        scelo@intelligentactuaries.com
          Public surfaces               https://intelligentactuaries.com
                                        https://github.com/intelligentactuaries
                                        https://huggingface.co/intelligentactuaries
        
        ────────────────────────────────────────────────────────────────────────
        END OF LICENSE
        ────────────────────────────────────────────────────────────────────────
License-File: LICENSE
Keywords: actuarial,actuary,chain-ladder,commutation,credibility,glm,ifrs17,insurance,life-table,lifelib,mortality,pricing,reserving,scelo,solvency
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Provides-Extra: all
Requires-Dist: chainladder>=0.8; extra == 'all'
Requires-Dist: lifelib==0.14.0; extra == 'all'
Requires-Dist: matplotlib>=3.6; extra == 'all'
Requires-Dist: modelx==0.32.0; extra == 'all'
Requires-Dist: openpyxl>=3.1; extra == 'all'
Requires-Dist: pyarrow>=12; extra == 'all'
Requires-Dist: scipy>=1.9; extra == 'all'
Requires-Dist: statsmodels>=0.14; extra == 'all'
Provides-Extra: dev
Requires-Dist: chainladder>=0.8; extra == 'dev'
Requires-Dist: matplotlib>=3.6; extra == 'dev'
Requires-Dist: openpyxl>=3.1; extra == 'dev'
Requires-Dist: pyarrow>=12; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: scipy>=1.9; extra == 'dev'
Requires-Dist: statsmodels>=0.14; extra == 'dev'
Provides-Extra: io
Requires-Dist: openpyxl>=3.1; extra == 'io'
Requires-Dist: pyarrow>=12; extra == 'io'
Provides-Extra: life
Requires-Dist: lifelib==0.14.0; extra == 'life'
Requires-Dist: modelx==0.32.0; extra == 'life'
Requires-Dist: openpyxl>=3.1; extra == 'life'
Provides-Extra: reserving
Requires-Dist: chainladder>=0.8; extra == 'reserving'
Provides-Extra: stats
Requires-Dist: scipy>=1.9; extra == 'stats'
Requires-Dist: statsmodels>=0.14; extra == 'stats'
Provides-Extra: viz
Requires-Dist: matplotlib>=3.6; extra == 'viz'
Description-Content-Type: text/markdown

# scelo for Python

**Soft data → tools → hard data, in as few lines as it takes to be right.**

`scelo` is the Scelo IDE's brain layer as a Python library: the same data
typing, the same cleaning rules, the same life tables, reserving engine and
forecast model that the desktop workbench runs, for actuaries who would
rather write three lines of code than click through a workstation.

```python
import scelo as sc

df  = sc.load("claims.csv")        # typed the way Scelo IDE types it
df  = sc.clean(df)                 # the IDE's safe cleaning ops, audited
res = sc.reserve(df)               # chain ladder, Mack, BF, ODP bootstrap
sc.report(res, to="pack.html")     # a board pack: numbers that carry their basis
```

That is a reserving exercise: triangle built from a long claims file with
the origin, development and amount columns inferred, four methods, a
standard error, a bootstrap distribution, and a report whose every table
prints its basis, its caveats and a content hash.

## Install

```bash
pip install scelo                  # numpy + pandas only
pip install "scelo[stats]"         # + scipy, statsmodels (GLMs via statsmodels, scipy fits)
pip install "scelo[life]"          # + lifelib 0.14.0 / modelx 0.32.0, the pair Scelo IDE ships
pip install "scelo[viz]"          # + matplotlib for the sc.plot_* family
pip install "scelo[all]"
```

The core depends on numpy and pandas alone and runs on the CPython that
Scelo IDE bundles. Everything statistical has a numpy implementation and
uses scipy / statsmodels when they are there (the numpy GLM is tested to
agree with statsmodels to 1e-5).

## The idea

Stata gets one thing right: `describe`, `tab`, `regress` are whole analyses
in a word. pandas gets another: the frame is the lingua franca. scelo is
both. Every function takes a DataFrame first, infers the columns it needs
from their names (`accident_year`, `AY`, `origin` all mean origin), and
returns a **Table**: a real `pandas.DataFrame` that also carries

- `title`: what it is,
- `basis`: one line of provenance (`Gompertz–Makeham (illustrative) · i = 4 %`),
- `notes`: the things an actuary should know before trusting it,
- `provenance`: a content hash, timestamp and audit trail once you `sc.hard()` it.

Print a Table and the notes print under it. Slice it, merge it, plot it:
it is still pandas. `t.df` gives the plain frame back.

```python
>>> sc.life_table().head(3)
   age        qx        px         lx         dx            Lx            Tx         ex
0   20  0.000250  0.999750  100000.00  24.963902  99987.518049  6.591309e+06  65.913088
1   21  0.000253  0.999747   99975.04  25.325403  99962.373399  6.491321e+06  64.929422
2   22  0.000257  0.999743   99949.71  25.732197  99936.844601  6.391359e+06  63.945747
— Life table · Gompertz–Makeham (illustrative)
  basis: Gompertz–Makeham (illustrative)
  · Mortality is Scelo's ILLUSTRATIVE Gompertz–Makeham basis (A = 0.00022, B = 2.7e-6, c = 1.124),
    not a published standard table: swap in your own qx column or parameters before relying on the figures.
  · Radix l(20) = 100,000; table closed at age 110 (qx set to 1). Lx uses the uniform-deaths approximation lx − ½dx.
```

## Sixty-second tour

```python
import scelo as sc

# ── soft data ────────────────────────────────────────────────────────────
df = sc.sample("dirty")            # the IDE's messy-intake demo (or sc.load("file.csv"))
sc.profile(df)                     # type, missing, unique, five-number summary, fences, top values
sc.describe(df)                    # Bessel sd, type-7 quantiles, G1/G2 shape, Jarque–Bera, ranked by CV
sc.tab(df, "Region")               # Stata's tab
sc.suggest(df)                     # the cleaning plan with evidence: 12 ops, 7 safe
clean = sc.clean(df)               # the 9 safe ops (trim, mojibake, missing markers, numbers, dates, booleans, sentinels …)
clean = sc.clean(df, "all")        # + dedupe, drop empty/constant, impute, cap outliers, snake_case: until clean
sc.combine(a, b)                   # append or join-left, decided from the schemas and keys, with the evidence

# ── life ─────────────────────────────────────────────────────────────────
sc.life_table(qx_df)               # age, qx, px, lx, dx, Lx, Tx, ex from any basis (qx / lx / deaths+exposure / Makeham)
sc.commutation(i=0.04)             # Dx Nx Cx Mx Rx Sx
sc.factors(i=0.04, n=10)           # äx ax Ax äx:n A¹x:n nEx Ax:n
sc.premium(i=0.04, product="term") # net premium per 1,000 SA, age × term grid
sc.ae(experience_df)               # actual vs expected by age band against a basis
sc.graduate(crude_qx, h=100)       # Whittaker–Henderson
sc.lee_carter(rates_df)            # SVD fit + random-walk-with-drift forecast, 95 % interval
sc.kaplan_meier(df)                # S(t), Greenwood SE, log-log bounds
sc.basicterm(model_points)         # lifelib BasicTerm_ME monthly projection, pure numpy
sc.scr_life(model_points)          # Solvency II life SCR: standard-formula shocks on that projection
sc.csm(model_points, ra=0.05)      # IFRS 17 general-model CSM and its coverage-unit roll-forward
sc.lifelib_run("basiclife", "BasicTerm_ME", model_points)   # the real lifelib model (pip install "scelo[life]")

# ── reserving ────────────────────────────────────────────────────────────
tri = sc.triangle(claims)          # origin × development, cumulative, from a long file
sc.chain_ladder(tri); sc.mack(tri); sc.bf(tri); sc.cape_cod(tri, premium); sc.bootstrap(tri, n=1000)
sc.reserve(claims)                 # all of the above in one table

# ── finance & risk ──────────────────────────────────────────────────────
sc.discount_curve({1: .03, 5: .04, 10: .05}); sc.smith_wilson(tenors, rates, ufr=.042)
sc.pv(cf, .05); sc.irr(cf); sc.annuity_certain(10, .05, due=True); sc.duration(cf, .05)
sc.aggregate_loss("poisson", "lognormal", lam=5, mu=8, sigma=1)   # Panjer / FFT / Monte Carlo
sc.fit(losses); sc.var(x, .995); sc.tvar(x, .995)
sc.credibility(df, "group", "loss_ratio"); sc.aggregate_scr({"mortality": 100, "lapse": 200})

# ── pricing & fairness ──────────────────────────────────────────────────
m = sc.glm(df, "claims ~ C(region) + age", "poisson", offset="exposure")   # base="first" for R / statsmodels reference levels
m.relativities(); m.predict(new); sc.lift(y, m.fitted)
sc.fairness(df, "y", "score", "group"); sc.fairness_audit(df, "score", "protected", ["age"])

# ── forecast & swarm ────────────────────────────────────────────────────
sc.wmtr("pension scheme with a weakening sponsor covenant")   # W(M,T,R) Monte Carlo, same numbers as the IDE
sc.council("…scenario…", subset=32)                            # convene the professional council (needs the swarm)
sc.society("…scenario…", size=200)                             # simulate a population's response

# ── charts (matplotlib) ─────────────────────────────────────────────────
sc.plot_rates(df, "country", "lapsed", exposure="exposure")   # rate by group, 95 % intervals
sc.plot_relativities(m); sc.plot_projection(bt); sc.plot_scr(scr); sc.plot_csm(csm); sc.plot_triangle(tri)

# ── hard data ───────────────────────────────────────────────────────────
t = sc.hard(sc.mack(tri).table, assumptions={"tail": 1.0})
sc.report(t, sc.life_table(), to="pack.html")                  # board pack with notes, hashes, audit trail
sc.audit()                                                     # everything the tools layer did this session
```

`sc.cheatsheet()` prints the one-screen version. `df.sc.clean()`,
`df.sc.triangle().sc.mack()` give you the same functions as methods.

## What comes from where

| Area | Source of truth inside Scelo | Notes |
|---|---|---|
| Import typing, profiling, descriptive stats | `packages/scelo-core` | type-7 quantiles, Bessel sd, G1/G2, Jarque–Bera, CV ranking: identical |
| Cleaning (18 ops, thresholds, pass loop) | `apps/web/.../cleaning.ts` | same token sets, regexes and thresholds; `suggest()` is the banner |
| Combine (append / join-left, key detection) | `apps/web/.../combineData.ts` | first right match wins, `_2` renames |
| Life tables, commutation, factors, premiums, A/E, model points | `packages/scelo-core/actuarialTables.ts` | the chat's "build a life table at 4 %" |
| Chain ladder, Mack, BF, ODP bootstrap | `apps/web/.../bridges/chainladderPython.ts` | Mack reproduces the published RAA figures (IBNR 52,135; SE 26,909) |
| BasicTerm projection | `apps/web/.../lifelibBasicTerm.ts` | Scelo's illustrative assumptions; `lifelib_run` for the real thing |
| WMTR forecast | `apps/swarm/src/shared/wmtr.ts` | bit-exact RNG; tables agree to 1e-14 |
| Workspace bottleneck / active subspace | `apps/web/.../bridges/bottleneckPython.ts` | |
| Swarm client | `apps/swarm/src/server/index.ts` | council, society, augment, interventions, justifications |

## Lines of code

The same reserving study, three ways:

| | lines |
|---|---|
| pandas + numpy from scratch (triangle, factors, Mack MSE, ODP bootstrap) | ≈ 120 |
| `chainladder` | ≈ 12 |
| **scelo** `sc.reserve("claims.csv")` | **1** |

and the caveats, the basis line and the hash come with it.

## The swarm

Scelo IDE bundles the swarm (a Bun server on `127.0.0.1:3010`): a stratified
council of 8 professions × 16 MBTI types × 2 genders that deliberates over
a scenario with the WMTR evidence injected, and a society simulator.
`sc.council`, `sc.society`, `sc.augment`, `sc.intervene` and `sc.justify`
talk to it with the standard library only; `sc.connect(url)` points
elsewhere. The WMTR engine itself is ported, so `sc.wmtr` needs no server.

## Testing

```bash
pip install "scelo[dev]" && pytest
```

The suite checks the IDE's own golden values (actuarial-table identities,
the hand-computed descriptive statistics, the reserving fixture), the
published RAA results, a TypeScript-generated WMTR fixture, numpy-vs-
statsmodels GLM parity for five families, and every cleaning rule.

## License

Scelo IDE Source-Available License v1.1 (`LicenseRef-Scelo-IDE-1.1`), the
same license as the IDE: free to use, including commercially; a 3 %
royalty on a Licensed Product's gross revenue above ZAR 1,000,000
lifetime. See `LICENSE`.

Intelligent Actuaries (Pty) Ltd · scelo@intelligentactuaries.com
