# Necta-API
Get a formated data of examination results scrapped from necta results website.
Note this is not an official [NECTA](https://necta.go.tz/) API and is still in development
Current version is `Beta 2.0.6`
This Version comes with a more modular structure compared to the previsious ones
Developed by [**Tanzania Programmers**](https://tanzaniaprogrammers.com/), written *by Vincent Laizer.*
---
---
## Usage
- [x] Get the package via pip
```bash
pip install nectaapi
```
- In any return value **None** indicates that no data could be scrapped
- [x] Get a list of all schools in a given year and exam type.
exam type can be **acsee** or **csee** (for now, more to be added)
```python
from nectaapi import schools
data = schools.schools(2017, 'csee')
```
The function returns a dictionary in the form
```python
{
"exam_type": "examamination type",
"year_of_exam": "year of examination",
"number_of_schools": "number of schools in this exam and year",
"schools": [
{
"school_name": "school name 1",
"registration_number":"registration number 1"
},
{
"school_name": "school name 2",
"registration_number":"registration number 2"
},
...]
}
```
- [x] Get a highlight of school overal results
```python
from nectaapi import summary
data = summary.summary(year, examType, schoolNumber)
# schoolNumber is the schools registration number ie s3881 or s1268
```
The function returns a dictionary in the form
```python
{
"school_name": "name of school",
"school_number": "school_number",
"exam_type": "exam_type",
"year_of_exam": "year",
"school_category":"category based on number of students",
"number_of_students": "total number of students",
"school_region":"regional location of the school",
"male_students": "number of male students",
"female_students": "number of female students",
"absentees": "number of students who missed the exam",
"division_one": "number of division one",
"division_two": "number of division two",
"division_three": "number of division three",
"division_four": "number of division four",
"division_zero":"number of division zero",
"national_position": "school's national position",
"regional_position": "school's regional position",
"total_national_schools":"number of schools national wise",
"total_regional_schools":"number of schools regional wise",
"gpa": "school's GPA"
}
```
- [x] Get a single students results
```python
from nectaapi import student
results = student.student(year, examType, schoolNumber, studentNumber)
# student number is the students part of their examination number eg 0040 or 0553
```
The 'student' function returns a dictionary of this form
```python
{
"examination_number":"students examination number",
"year_of_exam":"year",
"exam_type":"exam type",
"school_name":"name of student's school",
"gender":"student's gender",
"division":"students division",
"points":"grade points",
"subjects":
{
"subject1":"score1",
"subject2":"score2",
...
}
}
```
- [x] Compare schools performance over a range of years or of just a single school
_not present in perivious versions_
The parameters of the function are, the start year, end year of comparison, exam type and a list of schools to compare. start year is always less than end year, suppose they are equal a one year comparison is returned
```python
from nectaapi import comparison
data = comparison.comparison(startYear, endYear, examType, ["school_number1", "school_number2", ...])
```
It then returns a dictionary with school comparable data like, gpa, national_position and number_of_students in the form
```python
{
"year1":{
"school_number1":{
"gpa":"",
"national_position":"",
"number_of_students":""
},
"school_number2":{
"gpa":"",
"national_position":"",
"number_of_students":""
},
...
},
"year2":{
"school_number1":{
"gpa":"",
"national_position":"",
"number_of_students":""
},
"school_number2":{
"gpa":"",
"national_position":"",
"number_of_students":""
},
...
}
...
}
```
As one of my teachers said, **"Academics is one of the 3 areas in life where competition is allowed"** *Mr. H. Masegense*, so don't mind comparing performance of schools over the years
+ Comparison module comes with a bonus function to check if a school participated in national examinations of a given type and year. Returns a boolean value
```python
from nectaapi import comparison
isPresent = comparison.schoolPresent(year, exam_type, school_number)
```
## What's New
## Version 2.0.6
- Compatibility with 2023 **CSEE** results format
- Compatibility with 2023 **ACSEE** results format
- Minor bug fixes
## Version 2.0.5
- Minor bug fixes
## Version 2.0.4
- Compatibility with 2022 **ACSEE** results format
## Version 2.0.3
- Compatibility with 2021 **CSEE** results format
## Version 2.0.0
- Bug fixes on the school summary function
- proper handling of the year 2015 where GPA system was used.
- note, in this year, distinction is counted as division one, merit as division two, credit as division three, pass as division four and fail as division zero.
- school comparison function
- code modularity improvement
---
check out video tutorial on [YouTube](https://www.youtube.com/channel/UCuMUw-djxHqOHrvnnFGYtZA) for demos.
---
### contributions are awaited for **GitHub repo [NECTA-API](https://github.com/vincent-laizer/NECTA-API)**
Raw data
{
"_id": null,
"home_page": "https://github.com/vincent-laizer/NECTA-API",
"name": "nectaapi",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, necta, api, necta api, necta tanzania, tanzania programmers",
"author": "Tanzania Programmers (Vincent Laizer)",
"author_email": "<laizercorp@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/a4/a0/388c06baa947bab9a86037b7e5ade99483d385f3a4f194737e1555748d08/nectaapi-2.0.6.tar.gz",
"platform": null,
"description": "# Necta-API\n\nGet a formated data of examination results scrapped from necta results website.\n\nNote this is not an official [NECTA](https://necta.go.tz/) API and is still in development\n\nCurrent version is `Beta 2.0.6`\n\nThis Version comes with a more modular structure compared to the previsious ones \n\nDeveloped by [**Tanzania Programmers**](https://tanzaniaprogrammers.com/), written *by Vincent Laizer.*\n\n---\n\n---\n\n## Usage\n\n- [x] Get the package via pip\n\n ```bash\n pip install nectaapi \n ```\n\n - In any return value **None** indicates that no data could be scrapped\n\n- [x] Get a list of all schools in a given year and exam type.\n\n exam type can be **acsee** or **csee** (for now, more to be added)\n\n ```python\n from nectaapi import schools\n\n data = schools.schools(2017, 'csee') \n ```\n\n The function returns a dictionary in the form\n\n ```python\n {\n \"exam_type\": \"examamination type\",\n \"year_of_exam\": \"year of examination\",\n \"number_of_schools\": \"number of schools in this exam and year\",\n \"schools\": [\n {\n \"school_name\": \"school name 1\",\n \"registration_number\":\"registration number 1\"\n },\n {\n \"school_name\": \"school name 2\",\n \"registration_number\":\"registration number 2\"\n },\n ...]\n }\n ```\n\n- [x] Get a highlight of school overal results\n\n ```python\n from nectaapi import summary\n\n data = summary.summary(year, examType, schoolNumber)\n\n # schoolNumber is the schools registration number ie s3881 or s1268\n ```\n\n The function returns a dictionary in the form\n \n ```python\n {\n \"school_name\": \"name of school\",\n \"school_number\": \"school_number\",\n \"exam_type\": \"exam_type\",\n \"year_of_exam\": \"year\",\n \"school_category\":\"category based on number of students\",\n \"number_of_students\": \"total number of students\",\n \"school_region\":\"regional location of the school\",\n \"male_students\": \"number of male students\",\n \"female_students\": \"number of female students\",\n \"absentees\": \"number of students who missed the exam\",\n \"division_one\": \"number of division one\",\n \"division_two\": \"number of division two\",\n \"division_three\": \"number of division three\",\n \"division_four\": \"number of division four\",\n \"division_zero\":\"number of division zero\",\n \"national_position\": \"school's national position\",\n \"regional_position\": \"school's regional position\",\n \"total_national_schools\":\"number of schools national wise\",\n \"total_regional_schools\":\"number of schools regional wise\",\n \"gpa\": \"school's GPA\"\n }\n ```\n\n- [x] Get a single students results\n\n ```python\n from nectaapi import student\n\n results = student.student(year, examType, schoolNumber, studentNumber)\n\n # student number is the students part of their examination number eg 0040 or 0553\n ```\n\n The 'student' function returns a dictionary of this form\n \n ```python \n {\n \"examination_number\":\"students examination number\",\n \"year_of_exam\":\"year\",\n \"exam_type\":\"exam type\",\n \"school_name\":\"name of student's school\",\n \"gender\":\"student's gender\",\n \"division\":\"students division\",\n \"points\":\"grade points\",\n \"subjects\":\n {\n \"subject1\":\"score1\",\n \"subject2\":\"score2\",\n ...\n }\n }\n ```\n\n- [x] Compare schools performance over a range of years or of just a single school\n\n _not present in perivious versions_\n\n The parameters of the function are, the start year, end year of comparison, exam type and a list of schools to compare. start year is always less than end year, suppose they are equal a one year comparison is returned\n\n ```python\n from nectaapi import comparison\n data = comparison.comparison(startYear, endYear, examType, [\"school_number1\", \"school_number2\", ...])\n ```\n\n It then returns a dictionary with school comparable data like, gpa, national_position and number_of_students in the form\n\n ```python\n {\n \"year1\":{\n \"school_number1\":{\n \"gpa\":\"\",\n \"national_position\":\"\",\n \"number_of_students\":\"\"\n },\n \"school_number2\":{\n \"gpa\":\"\",\n \"national_position\":\"\",\n \"number_of_students\":\"\"\n },\n ...\n },\n \"year2\":{\n \"school_number1\":{\n \"gpa\":\"\",\n \"national_position\":\"\",\n \"number_of_students\":\"\"\n },\n \"school_number2\":{\n \"gpa\":\"\",\n \"national_position\":\"\",\n \"number_of_students\":\"\"\n },\n ...\n }\n ...\n }\n ```\n\n As one of my teachers said, **\"Academics is one of the 3 areas in life where competition is allowed\"** *Mr. H. Masegense*, so don't mind comparing performance of schools over the years\n\n + Comparison module comes with a bonus function to check if a school participated in national examinations of a given type and year. Returns a boolean value\n\n ```python\n from nectaapi import comparison\n isPresent = comparison.schoolPresent(year, exam_type, school_number)\n ```\n\n## What's New\n\n## Version 2.0.6\n\n- Compatibility with 2023 **CSEE** results format\n- Compatibility with 2023 **ACSEE** results format\n- Minor bug fixes\n\n## Version 2.0.5\n\n- Minor bug fixes\n\n## Version 2.0.4\n\n- Compatibility with 2022 **ACSEE** results format\n\n## Version 2.0.3\n\n- Compatibility with 2021 **CSEE** results format\n\n## Version 2.0.0\n\n- Bug fixes on the school summary function\n- proper handling of the year 2015 where GPA system was used.\n - note, in this year, distinction is counted as division one, merit as division two, credit as division three, pass as division four and fail as division zero.\n- school comparison function\n- code modularity improvement\n\n---\n\n check out video tutorial on [YouTube](https://www.youtube.com/channel/UCuMUw-djxHqOHrvnnFGYtZA) for demos.\n\n---\n\n### contributions are awaited for **GitHub repo [NECTA-API](https://github.com/vincent-laizer/NECTA-API)**\n",
"bugtrack_url": null,
"license": null,
"summary": "Fetch results of various national examinations done in Tanzania",
"version": "2.0.6",
"project_urls": {
"Homepage": "https://github.com/vincent-laizer/NECTA-API"
},
"split_keywords": [
"python",
" necta",
" api",
" necta api",
" necta tanzania",
" tanzania programmers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c18bba2ed1583ce2dc1ccad2bf6d6beab430de326fd0b0339d16478f5cbdfff",
"md5": "e367905fded5a99459d98ef4c1a60f9c",
"sha256": "46e548a5f9a796d41d8cde4e274b8233ff2ade35e0a4c8c7e2b439d823ed03d0"
},
"downloads": -1,
"filename": "nectaapi-2.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e367905fded5a99459d98ef4c1a60f9c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12264,
"upload_time": "2024-05-19T13:27:36",
"upload_time_iso_8601": "2024-05-19T13:27:36.227229Z",
"url": "https://files.pythonhosted.org/packages/2c/18/bba2ed1583ce2dc1ccad2bf6d6beab430de326fd0b0339d16478f5cbdfff/nectaapi-2.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a4a0388c06baa947bab9a86037b7e5ade99483d385f3a4f194737e1555748d08",
"md5": "e2345e3d4f1f427050508be8583b0517",
"sha256": "2f33811078c1410a6305f015e75b6191cf3cc7b6ece3444ea85d9ec27c626fd2"
},
"downloads": -1,
"filename": "nectaapi-2.0.6.tar.gz",
"has_sig": false,
"md5_digest": "e2345e3d4f1f427050508be8583b0517",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11970,
"upload_time": "2024-05-19T13:27:38",
"upload_time_iso_8601": "2024-05-19T13:27:38.119546Z",
"url": "https://files.pythonhosted.org/packages/a4/a0/388c06baa947bab9a86037b7e5ade99483d385f3a4f194737e1555748d08/nectaapi-2.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-19 13:27:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vincent-laizer",
"github_project": "NECTA-API",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "nectaapi"
}