Skip to main content

A Python package for accessing NECTA (National Examinations Council of Tanzania) results

Project description

NectaPy

A Python package for accessing NECTA (National Examinations Council of Tanzania) examination results.

Installation

pip install NectaPy

Usage

from NectaPy import st_result, sc_result, st_compare, st_mentioned

Get student result

# Possible levels: 'sfna', 'psle', 'ftna', 'csee', 'acsee', 'gatce', 'dsee', 'gatscce'
# Use st_result when finding a single student's result.
result = st_result('S4177/0003/2023', 'csee')
print(result)

Get school results

# Possible levels: 'sfna', 'psle', 'ftna', 'csee', 'acsee', 'gatce', 'dsee', 'gatscce'
# Use sc_result when you need to see the results of all students at a given school.
school_results = sc_result('S1001/2023', 'csee')
print(school_results)

Compare student results

# Possible levels: 'sfna', 'psle', 'ftna', 'csee', 'acsee', 'gatce', 'dsee', 'gatscce'
# Use st_compare when you need to compare students of the same level but from different schools or years, or the same school and year.
comparison_results = st_compare(['S0010/0001/2024', 'S3200/0100/2023', 'S0012/0005/2022'], 'csee')
print(comparison_results)

Get mentioned students results

# Possible levels: 'sfna', 'psle', 'ftna', 'csee', 'acsee', 'gatce', 'dsee', 'gatscce'
# Use st_mentioned when you need to find different students at the same time, who can be from different or the same year, level, or school.
mentioned_results = st_mentioned([('S1266/0001/2020', 'csee'), ('S2265/0001/2022', 'ftna'), ('S1066/0001/2017', 'csee')])
print(mentioned_results)

Supported Examinations

Primary Level:

  • SFNA (Standard 2): 2017-2024
  • PSLE (Standard 7): 2016-2024

Secondary Level:

  • FTNA (Form 2): 2022-2024
  • CSEE (Form 4): 2015-2024
  • ACSEE (Form 6): 2014-2025

College Level:

  • GATCE: 2019-2024
  • DSEE: 2019-2024
  • GATSCCE: 2019-2024

Features

  • Easy to use API
  • Supports all major NECTA examinations
  • Returns results in dictionary format
  • Handles errors gracefully
  • Python 3+ compatible

Example Output

Student Result

{
    "CNO": "S4177/0003",
    "CANDIDATE NAME": "JOHN DOE",
    "SEX": "M",
    "DIV": "I",
    "PTS": "17",
    "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
}

School Results

{
    "school_no": "S1001",
    "school_name": "S1001 MBESA SECONDARY SCHOOL ",
    "results": [
        {
            "CNO": "S1001/0001",
            "PReM NO": "xxxxxxx",
            "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
            "GENDER": "XX",
            "SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
        },
        // ...more student results...
    ]
}

Compare Student Results

{
    "student1": {
        "CNO": "S0010/0001",
        "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
        "SEX": "M",
        "DIV": "I",
        "PTS": "17",
        "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
    },
    "student2": {
        "CNO": "P3200/0100",
        "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
        "SEX": "M",
        "DIV": "I",
        "PTS": "17",
        "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
    },
    "student3": {
        "CNO": "S0012/0005",
        "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
        "SEX": "M",
        "DIV": "I",
        "PTS": "17",
        "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
    }
}

Mentioned Students Results

{
    "student1": {
        "CNO": "S1266/0001",
        "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
        "SEX": "M",
        "DIV": "I",
        "PTS": "17",
        "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
    },
    "student2": {
        "CNO": "S2265/0001",
        "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
        "SEX": "M",
        "DIV": "I",
        "PTS": "17",
        "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
    },
    "student3": {
        "CNO": "S1066/0001",
        "CANDIDATE NAME": "XXXXX XXXXX XXXXX",
        "SEX": "M",
        "DIV": "I",
        "PTS": "17",
        "DETAILED SUBJECTS": "CIVICS-'B' HIST-'A' GEO-'A' KISW-'B' ENGL-'A' PHY-'B' CHEM-'A' BIO-'B' B/MATH-'B'"
    }
}

License

MIT License

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

nectapy-0.10.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

NectaPy-0.10.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file nectapy-0.10.0.tar.gz.

File metadata

  • Download URL: nectapy-0.10.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for nectapy-0.10.0.tar.gz
Algorithm Hash digest
SHA256 9c95765bfdda59f2a6cce4b62fe84f9f4fc096b299d78e296dc99908b92b1cb3
MD5 1a5c817eec68255b79e6af076538dd13
BLAKE2b-256 d02b1a65f8525e048bf0e467b0ac8d1203a534d00f38c8f2005b53ff386c3433

See more details on using hashes here.

File details

Details for the file NectaPy-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: NectaPy-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for NectaPy-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb12ba6e5e918c7b07150637394f767da6aac386d6f71249858325dba3707902
MD5 6832f4207de5934e0f08b048980b9fc2
BLAKE2b-256 b34a4d0f8f2ce745e59b1565892f5269e1858d175a556322468cc7a7913f6b32

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